Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

I want to programmatically "track" files

Hi to everyone.


I want to program something that I think it is tricky and I do not know if it is supported.

What I would like to do is select a file and be able to track its position even if it is moved to a new directory or deleted.


Can this be done?


thanks in advance,

OS X Mountain Lion

Posted on Oct 12, 2012 12:33 PM

Reply
Question marked as Best reply

Posted on Oct 12, 2012 4:38 PM

You can use a bookmark, which can be used to get a URL even if the file is moved or renamed - see the File System Programming Guide.

5 replies

Oct 15, 2012 7:58 AM in response to Mihalis Tsoukalos

Mihalis Tsoukalos wrote:


Are FSEvents better than bookmarks?

Why not use a bookmark?

Based on my understanding of bookmarks, they are essentially just another pointer to a file. They will always allow you to access your file, even if you move it around. They will not, however, allow you to track the file. I think they are just URLs to private hard links to the file in question. If you want to know where the file is in relation to other directories, then FSEvents is probably better.

I want to programmatically "track" files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.