Filename case-insensitivity on OS X

Doug Schwarz see at sig.for.address.edu
Tue Jan 3 10:21:19 EST 2006


In article <Pine.LNX.4.62.0601031400260.12047 at urchin.earth.li>,
 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).


Strictly speaking, it's not OS X, but the HFS file system that is case 
insensitive.  You can use other file systems, such as "UNIX File 
System".  Use Disk Utility to create a disk image and then erase it 
(again, using Disk Utility) and put UFS on it.  You'll find that "touch 
foo FOO" will create two files.

-- 
Doug Schwarz
dmschwarz&urgrad,rochester,edu
Make obvious changes to get real email address.



More information about the Python-list mailing list