Re: parse-namestring and logical pathnames



On Sep 30, 5:57 pm, Richard M Kreuter <kreu...@xxxxxxxxx> wrote:
Marco Antoniotti <marc...@xxxxxxxxx> writes:
On Sep 28, 6:44 pm, Richard M Kreuter <kreu...@xxxxxxxxx> wrote:
Marco Antoniotti <marc...@xxxxxxxxx> writes:
Besides, lowercasing in Unix is wrong as the file system is case-
sensitive.

Customary case is meant to be whatever lettercase is normally used in
file names on a file system, not whether the file system is
case-preserving or case-insensitive.  The examples in the dictionary
entry for MAKE-PATHNAME shows and the Issue PATHNAME-COMPONENT-CASE
mentions that customary case for Unix is supposed to be lowercase.

Yes.  And *that* is wrong (the supposition that customary case for
Unix is lowercase).

On the Unix hosts I've checked, the ratio of all-lowercase directory
entry names to any-uppercase directory entry names is around 5 to 1, and
that all-uppercase directory entry names make up around one
three-thousandth of the total number of names.  Isn't that good enough
evidence that filenames are normally lowercase on Unix?

It is evidence enough that using :case :common in MAKE-PATHNAME (*)
assuming that UNIX file system is lowercase is broken.

$ touch myextremelyimportantfile

cl-prompt> (delete-file-while-not-knowing-that-I-am-on-a-UNIX-
filesystem (make-pathname :name
"MYEXTREMELYIMPORTANTFILE" :case :common))

$ touch MYCOMPLETEGARBAGE

cl-prompt> (delete-file-while-not-knowing-that-I-am-on-a-UNIX-
filesystem (make-pathname :name "MYCOMPLETEGARBAGE" :case :common))

may fail in "surprising" ways.

In any case, since UNIX file systems are case sensitive the following
passage from 19.2.2.1 applies "If the file system supports both cases,
strings given or received as pathname component values under this
protocol are to be used exactly as written. If the file system only
supports one case, the strings will be translated to that case."

Cheers
--
Marco

(*) Besides, there is also the argument, which can be argued for or
against, that MAKE-PATHNAME should *not* look at the file system to
build its result. Same for MERGE-PATHNAMES.


.



Relevant Pages

  • Re: parse-namestring and logical pathnames
    ... file names on a file system, not whether the file system is ... entry for MAKE-PATHNAME shows and the Issue PATHNAME-COMPONENT-CASE ... Unix is lowercase). ...
    (comp.lang.lisp)
  • Re: Procedure on mounting USB/hotplug devices
    ... I couldn't find anything in man mount. ... entry in /etc/fstab for them. ... file system is mounted, and the process gnome-mount uses still ...
    (Fedora)
  • Re: parse-namestring and logical pathnames
    ... file names on a file system, not whether the file system is ... entry for MAKE-PATHNAME shows and the Issue PATHNAME-COMPONENT-CASE ... mentions that customary case for Unix is supposed to be lowercase. ... Unix is lowercase). ...
    (comp.lang.lisp)
  • Re: What is going on with du?
    ... > I'm trying to run du on a file system which is ... call on each entry. ... inode numbers, the driver have to make some up. ... So actually du might not work on a vfat file system ...
    (comp.os.linux.development.system)
  • Re: Missing hard drive space
    ... # /etc/fstab: static file system information. ... # Entry for /dev/sda1: ... tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 ... UUID for each partition that is not mounted. ...
    (Ubuntu)