Filename case-insensitivity on OS X
Piet van Oostrum
piet at cs.uu.nl
Wed Jan 4 09:00:04 EST 2006
>>>>> Doug Schwarz <see at sig.for.address.edu> (DS) wrote:
>DS> In article <Pine.LNX.4.62.0601031400260.12047 at urchin.earth.li>,
>DS> Tom Anderson <twic at urchin.earth.li> wrote:
>>> Afternoon all,
>>>
>>> MacOS X seems to have some heretical ideas about the value of case in
>>> paths - it seems to believe that it doesn't exist, more or less, so "touch
>>> foo FOO" touches just one file, you can't have both 'makefile' and
>>> 'Makefile' in the same directory,
>>> "os.path.exists(some_valid_path.upper())" returns True even when
>>> "os.path.split(some_valid_path.upper())[1] in
>>> os.listdir(os.path.split(some_valid_path)[0])" returns False, etc
>>> (although, of course, "ls *.txt" doesn't mention any of those .TXT files
>>> lying around).
>DS> Strictly speaking, it's not OS X, but the HFS file system that is case
>DS> insensitive. You can use other file systems, such as "UNIX File
>DS> System". Use Disk Utility to create a disk image and then erase it
>DS> (again, using Disk Utility) and put UFS on it. You'll find that "touch
>DS> foo FOO" will create two files.
It seems that with Tiger, HFS+ can be made case-sensitive. I haven't seen
it, only read about it.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list