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 comparing st_dev and st_ino).
Many thanks for this info, I will immediately switch my code across to use this as it's definitely more robust. >> Is there any way to know whether or not a file is on a case-sensitive volume? > > A couple of ways (there are others): > > On 10.6 and later, see NSURL's new resource-values APIs and > NSURLVolumeSupportsCaseSensitiveNamesKey. > > On 10.3 and later, see getattrlist and VOL_CAP_FMT_CASE_SENSITIVE. Thanks for the pointer. I guess if I'm using the aforementioned APIs to compare files then I won't need to worry about the case sensitivity of the file system anyway, though. -- Rob Keniger _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
