Hi, I am new to mac programming. I have a small task to do. I need to watch for file creation events in a folder, intercept them, and create symbolic links instead of a copy.
ANy idea if there is any source code to do so or any api i should use?
Hi, I am new to mac programming. I have a small task to do. I need to watch for file creation events in a folder, intercept them, and create symbolic links instead of a copy.
ANy idea if there is any source code to do so or any api i should use?
The traditional solution on OS X is to use something called Folder Actions which allows you to associate AppleScripts
with particular folders and actions. In more recent releases of OS X, Folder Actions are implemented under the covers by using launchd QueueDirectories and/or WatchPaths; it may be simpler to implement them directly. Also see the launchd
and launchd.plist
man pages.