0

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 would 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.

  • 1
    Check out http://stackoverflow.com/questions/1515730/is-there-a-command-like-watch-or-inotifywait-on-the-mac – sagi Jul 30 '11 at 11:59
  • 1
    I disagree with the votes to close on duplicate - the question doesn't specify the OS. – John Carter Jul 30 '11 at 20:16

1 Answers1

0

(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?

Community
  • 1
  • 1
sagi
  • 5,619
  • 1
  • 30
  • 31
  • Yup, was waiting for you to make it an answer to accept. Pity you can't accept comments. –  Jul 31 '11 at 13:00