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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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