Lex Spoon wrote:
Unix uses case-sensitive filenames. It's one of those religious debates as to which way is "better". But there are ways to make Squeak work the right way on each operating system. The best, IMHO, is to have a "file exists" primitive.
I'd prefer a method that returns whether or not the current platform is case-sensitive; how about the following:
!FileDirectory class methodsFor: 'platform specific'! isCaseSensitive "Answer whether the current platfor is case-sensitive about file names."
^DirectoryClass isCaseSensitive! !
The directory classes (Mac/Dos/UNIX) can then answer differently, and application code can call this to be "smart" about handling file name clashes or file-not-found errors.