• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Path comparison and case sensitivity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path comparison and case sensitivity


  • Subject: Re: Path comparison and case sensitivity
  • From: Rob Keniger <email@hidden>
  • Date: Wed, 6 Jan 2010 17:24:54 +1000

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@hidden)

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:

This email sent to email@hidden

References: 
 >Path comparison and case sensitivity (From: Rob Keniger <email@hidden>)
 >Re: Path comparison and case sensitivity (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: NSDate without time portion
  • Next by Date: Re: NSDate without time portion
  • Previous by thread: Re: Path comparison and case sensitivity
  • Next by thread: Re: Path comparison and case sensitivity
  • Index(es):
    • Date
    • Thread