Re: Properly comparing file NSURLs for equality?
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