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.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to