• 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: Sean McBride <email@hidden>
  • Date: Fri, 27 May 2011 20:51:12 -0400

On May 27, 2011, at 19:57, Douglas Davidson wrote:

>> 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.

Douglas,

That's perfect!  But for, shall we say, older cats :), would be next best thing be CFURLGetFSRef() & FSCompareFSRefs()? It seems ideal since it solves the problem of needing to canonicalize paths.

Peter, I tried absoluteURL but it doesn't change the result when the difference is only the 'localhost' part. :(

Thanks to all for your insightful replies!

Sean

_______________________________________________

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

  • Follow-Ups:
    • Re: Properly comparing file NSURLs for equality?
      • From: Ken Thomases <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