FSRef is the data type for referencing a particular file by record,
however it's not the pleasant to work with. Have you considered using
NDAlias etc. but setting them to resolve references by file ref, then
path. (By default, the alias manager looks up aliases by path first,
then file ref).
On 10 Dec 2008, at 13:59, Ben wrote:
Hi list,
I am trying to store a reference to a file in a database, such that
if the file moves, I can still search for it in my database.
I have read up on the Carbon Alias Manager and the third party
BSAlias/NDAlias classes but none of these quite seem to fit the bill
as it looks like I am working backwards from their designed use. ie,
rather than finding the file from a database record, I want to
lookup the database record from a known file.
In this situation, would it be best to use -[NSFileManager
attributesOfItemAtPath:error:] and store the NSFileSystemFileNumber?
I'm not sure how resilient this approach is. Or is there something
that I have missed completely?
Regards,
Ben
_______________________________________________
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/cocoadev%40mikeabdullah.net
This email sent to [EMAIL PROTECTED]
_______________________________________________
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 [EMAIL PROTECTED]