On Apr 4, 2010, at 12:50 PM, Jens Alfke wrote:

> You're saying that if I have a FSRef to a file, then the file is moved, the 
> FSRef will still reference the moved file and not the location where it used 
> to be?

Yes.  They are file-ID-based.


> That's surprising to me, because FSRefs were created as a replacement for 
> FSSpecs, which do not have that property (they were a struct {volume ID, dir 
> ID, filename}.)

True, although FSSpecs should have tracked the parent directory should it have 
been moved or renamed.  I'm not sure they did, though.

Also, remember that, unlike FSSpecs, FSRefs can only refer to existing 
files/directories -- precisely because they are file-ID-based.

It's hardly surprising that the replacement differs from the original, 
otherwise why replace the original?

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