I'm observing a file path for changes via file system events. Now I need to know if it is possible to get a reference to a file that is location independent, to keep track of the file when it is moved.
Is this be accomplished with OSX APIs?
I'm observing a file path for changes via file system events. Now I need to know if it is possible to get a reference to a file that is location independent, to keep track of the file when it is moved.
Is this be accomplished with OSX APIs?
You can do this by getting an alias reference to the file. This requires using Carbon API, but there's a nice Objective-C wrapper called NDAlias that I've used in the past: https://github.com/nathanday/ndalias .
See here for more documentation: https://developer.apple.com/library/mac/#documentation/Carbon/Reference/Alias_Manager/Reference/reference.html