How can I "track" a file using C++, or Python (I'm guessing C++ will be way more powerfull. Just putting Python in there in case there is a way with it, which wou开发者_运维问答ld be simpler than C++).
When I mean track, I mean registering any moving of the file to a different path, changes in name, etc. Changes in the actual content of the file isn't an issue.
(migrated from comment)
You can do that using launchd on OS X. Check out: Is there a command like "watch" or "inotifywait" on the Mac?
精彩评论