[BUG][FIX]FileDirectory>directoryExists: a bit silly

Tim Rowledge tim at sumeru.stanford.edu
Mon Aug 4 23:10:50 UTC 2003


John M McIntosh <johnmci at smalltalkconsulting.com> wrote:

> Tim, on the mac with the HFS file system you'll find the file system is  
> NOT case sensitive.
> So on unix you can have the files FOO & foo in the same directory, but  
> not on the HFS file system, where
> Foo is the same as foo, but certainly not on Unix, so hunting for FoO  
> might have some interesting
> behavior...
I'm not sure what effect this might have. I suspect it is broken right
now though since the Mac file directory classes both claim to be case
insensitive.

So far as I can make out it shouldn't be a problem since the OS code
ought to take care of it; if the OS cares about case then asking if foO
exists should only answer true for foO and not fOo. Contrawise, a
non-case sensitive OS would answer true for any dir with f, o & o.

The nice thing is that we can trivially do it platform specialised so
there should be no problem. All that is needed is a quick test on each
platform to see.



tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: CCP: Clear Core and Proceed



More information about the Squeak-dev mailing list