On May 27, 2011, at 7:51 PM, Sean McBride wrote:

> That's perfect!  But for, shall we say, older cats :), would be next best 
> thing be CFURLGetFSRef() & FSCompareFSRefs()?

We just had another thread about this subject.  For pre-10.6, yes, I think that 
FSCompareFSRefs() is good.  For 10.6, I believe you can convert the URLs to 
file-reference URLs and then compare with -isEqual:.

I also mentioned that one can use NSFileManager to get the attributes and 
compare both NSFileDeviceIdentifier and NSFileSystemFileNumber, which is 
basically equivalent to the earlier suggestion to use lstat() and compare 
st_dev and st_ino.

Apparently, the NSURLFileResourceIdentifierKey/kCFURLFileResourceIdentifierKey 
suggestion comes to us from the future. ;)

Cheers,
Ken

_______________________________________________

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