[X-Unix] Can you get the path from an inode?

Doug McNutt douglist at macnauchtan.com
Tue May 2 10:33:22 PDT 2006


Just a thought:

HFS+ does have a unique identifier for each file. "FileID" in the header files, I think. It is used for such things as Macintosh aliases which remember a file even if you change its name or move it into a different directory. The FileID at 32 bits is never reused (well, in principle it isn't).

With access to the HFS+ file structures as modified to support an inode number it might be possible to recover a FileID from an inode. Given the FileID the alias manager should be able to identify a file by name and path. It would be a learning experience and it's quite possible that the structures required are proprietary to Apple.

With the complex adjustment of HFS+ just to allow for hard links it's probably pretty complicated.
-- 

Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.


More information about the X-Unix mailing list