Casing in filesystems

Peter Crowther Peter.Crowther at melandra.com
Mon Mar 12 11:06:00 UTC 2001


> From: Karl Ramberg [mailto:karl.ramberg at chello.se]
> But will unix/linux find a file if I change the 
> casing og the test.MPG to test.mpg ?

If you ask the UNIX kernel (via open(2)) to open the file 'test.mpg': If the
file is called test.mpg in the filesystem, it will be found.  If the file is
called test.MPG (or test.Mpg, or Test.mpg, or...) in the filesystem, it will
not be found.  Period characters and hence extensions are not treated
specially in UNIX; a simple string comparison is done between the requested
file name and the name in the filesystem.

An application may, if it so wishes, implement some kind of search in this
case to see whether a file with a similar name exists --- that's up to the
application.  I don't believe Squeak does so.  I don't believe Squeak
*should* do so, either, but that's personal prejudice towards case-sensitive
systems.  MS-DOG users should learn that the CAPS LOCK key *does* make a
difference :-).

		- Peter





More information about the Squeak-dev mailing list