Re: Globally, persistently identifying a file
Re: Globally, persistently identifying a file
- Subject: Re: Globally, persistently identifying a file
- From: Chris Suter <email@hidden>
- Date: Fri, 27 Apr 2012 10:05:53 +1000
Hi Jonathan,
On Friday, 27 April 2012,
email@hidden wrote:
Is an object orientated interpretation of the problem helpful?
We are trying to track a file or path object as a unique entity with an object orientated file system regardless of the file/path object's current path or content properties.
If so then it's a question of identifying whether the OS X filesystem conforms to such a model or not, which probably brings us right back to the original question.
What you're trying to do will have compromises. HFS+ has a unique identifier that can be used to track a file, but only on that file-system; as soon as the file moves off that file system, the identifier becomes useless. Also, it's 32 bit and can wrap. Other file systems have varying degrees of support and some don't have any unique identifier, other than the path (e.g. FAT).
The other problem you'll have is that some applications do atomic updates by using renames, and this will not preserve the unique ID. Most applications should use exchangedata which is what the Cocoa frameworks use, I believe. It does not have this problem but I can guarantee that there will be some out there that use rename.
Kind regards,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden