I need to get hold of unique and persistent identifiers for a set of files. I know that the command
ls -i
in the terminal brings back the inode and file name for each file in a folder. Is there a way to retrieve the inode value in Xojo? I’ve looked at the Einhugur FolderItemInfo plugin but that doesn’t seem to pick up the inode value unless I’m missing something. I have seen references to NSFileSystemFileNumber elsewhere but I can’t work out how to get a handle on it.
I looked into this further. macOSLib has support for NSURL that includes bookmark data. You can save the bookmark data, which is a string of arbitrary bytes, and later recreate the NSURL from the saved bookmark data. If you’re familiar with alias records, this is a close analogue to those.
macOSLib even has built-in conversion to and from Xojo’s native FolderItem, so this can be a fairly seamless way to do it.