> On Jan 20, 2017, at 10:24 PM, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> It’s an interesting question whether file-references use inode numbers. Some 
> file systems don’t have them, so (I assume) they’re invented when such a file 
> system is mounted, but they’re not necessarily assigned permanently across 
> mounts. (I believe Apple documentation says not rely on the file number 
> returned by NSURL metadata methods being stable across mounts.) Even when 
> they’re baked into the file system, it’s not obvious what the semantics are 
> when a volume is copied, or a volume is restored from backup. Perhaps someone 
> else on this list is better informed on the subject than I am.

Actually, this is a common misconception; file references do *not* use inode 
numbers; they refer to CNIDs, which are a separate number stored in the catalog 
file. Inodes refer to raw file data on the disk; CNIDs point instead to a 
particular catalog node. You can have two or more hard links that all point to 
a specific file, but they’ll all have separate CNIDs, and if you delete one of 
them, you’ll break any file references pointing to that particular node.

Note that this is all HFS(+)-specific. APFS may be implemented differently, 
although in my limited testing, it appears to behave the same.

Charles

_______________________________________________

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

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

Reply via email to