Re: Properly comparing file NSURLs for equality?
Re: Properly comparing file NSURLs for equality?
- Subject: Re: Properly comparing file NSURLs for equality?
- From: James Walker <email@hidden>
- Date: Fri, 27 May 2011 16:45:28 -0700
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.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________
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