• 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: Properly comparing file NSURLs for equality?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Properly comparing file NSURLs for equality?


  • Subject: Re: Properly comparing file NSURLs for equality?
  • From: Mike Abdullah <email@hidden>
  • Date: Sat, 28 May 2011 01:10:25 +0100

On 28 May 2011, at 00:57, Douglas Davidson wrote:

>
> On May 27, 2011, at 4:45 PM, James Walker wrote:
>
>> On 5/27/2011 4:35 PM, Jens Alfke wrote:
>>
>>> Comparing paths has its own set of pitfalls: even if you’re not
>>> concerned about symlinks, there’s case-insensitivity to deal with. I’m
>>> not sure what the best way is to deal with that. You could canonicalize
>>> each path; or you could convert each URL to an FSRef and then compare
>>> those for equality.
>>
>> If you were going to compare FSRefs (FSCompareFSRefs), you wouldn't need to convert to a path, just use CFURLGetFSRef via toll-free bridging.
>
> It shouldn't be necessary to go to FSRefs for this now that we have resource properties such as NSURLFileResourceIdentifierKey/kCFURLFileResourceIdentifierKey.  For other usages of FSRefs, consider file reference URLs instead.

I can't find these documented – link?

_______________________________________________

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: 
 >Properly comparing file NSURLs for equality? (From: Sean McBride <email@hidden>)
 >Re: Properly comparing file NSURLs for equality? (From: Jens Alfke <email@hidden>)
 >Re: Properly comparing file NSURLs for equality? (From: James Walker <email@hidden>)
 >Re: Properly comparing file NSURLs for equality? (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Properly comparing file NSURLs for equality?
  • Next by Date: Re: Properly comparing file NSURLs for equality?
  • Previous by thread: Re: Properly comparing file NSURLs for equality?
  • Next by thread: Re: Properly comparing file NSURLs for equality?
  • Index(es):
    • Date
    • Thread