I have a list of files as :<volume name>:<directory inode>:<file name>
. For example, :Foo:33103829:IMG_2837.JPG
. How can I get the file path?
I found an answer here that looks to be exactly what I want, but I can't get it to work. The answer says that on OS X there is a 'magic' directory /.vol
that works on inodes. ls
tells me that /.vol
exists, but doesn't contain anything, even when accessed by inodes:
# verify that /.vol exists:
~$ ls -ld /.vol
drwxr-xr-x@ 2 root wheel 68 May 18 2009 /.vol/
# get inode of volume Foo
~$ ls -id /Volumes/Foo
32659974 /Volumes/Foo@
# access volume Foo by idnode
~$ ls /.vol/32659974
ls: /.vol/32659974: No such file or directory
# access volume Foo by idnode
~$ cd /.vol/32659974
cd: /.vol/32659974: No such file or directory
# access volume by inode using GetFileInfo
~$ GetFileInfo /.vol/32659974
GetFileInfo: could not refer to file (-43)