I\'ve been playing with FSEvents
in a little application of mine to synchronize the content of my application with what\'s on the hard drive (basically, it\'s a lit
Since these events only deal with paths, you'll have to do some extra work to handle renames. One option is to track the inode numbers of the files you're interested in. So when you do that stat call, also note the inode number and see if it matches any files you're tracking.
Be aware, though, that the OS may reuse the inode number of a deleted file, so depending on them as unique identifiers isn't infallible.