Re: Path comparison and case sensitivity

2010-01-06 Thread Alastair Houghton
On 6 Jan 2010, at 05:39, Ken Thomases wrote: > On Jan 5, 2010, at 6:51 PM, Rob Keniger wrote: > >> Should Cocoa applications always assume that the filesystem is >> case-insensitive when comparing path strings? Surely this could lead to >> problems if the user has formatted a volume with a case

Re: Path comparison and case sensitivity

2010-01-05 Thread Rob Keniger
On 06/01/2010, at 3:39 PM, Ken Thomases wrote: > Don't compare paths. Use APIs like FSCompareFSRefs() or call -[NSFileManager > attributesOfItemAtPath:error:] and compare the NSFileDeviceIdentifier and > NSFileSystemFileNumber keys (this is the Cocoa equivalent of calling stat(2) > and compar

Re: Path comparison and case sensitivity

2010-01-05 Thread Ken Thomases
On Jan 5, 2010, at 6:51 PM, Rob Keniger wrote: > Should Cocoa applications always assume that the filesystem is > case-insensitive when comparing path strings? Surely this could lead to > problems if the user has formatted a volume with a case-sensitive file system? Don't compare paths. Use AP

Path comparison and case sensitivity

2010-01-05 Thread Rob Keniger
My recent troubles with filesystem case got me thinking. Should Cocoa applications always assume that the filesystem is case-insensitive when comparing path strings? Surely this could lead to problems if the user has formatted a volume with a case-sensitive file system? Is there any way to know