0

I'm on a mac. My program monitors a directory, and I already have listeners in place for on_created and on_deleted, but I need to also detect when a file is saved and run a different function then. Is this possible using watchdog without platform-specific tools?



[NOTE] I know that I can use on_modified handler function, but that is also called when a file is created. I only want to detect when the content of the file changes, not when a file is created or deleted

[NOTE] note also that I need to watch a whole directory and all subdirectories and not just a single file
Jake
  • 2,090
  • 2
  • 11
  • 24
  • 1
    Does this answer your question? https://stackoverflow.com/questions/182197/how-do-i-watch-a-file-for-changes – kederrac Feb 24 '20 at 12:26
  • Does this answer your question? [How do I watch a file for changes?](https://stackoverflow.com/questions/182197/how-do-i-watch-a-file-for-changes) – rdas Feb 24 '20 at 12:28
  • I know that I can use ```on_modified``` handler function, but that is also called when a file is created. I only want to detect when the content of the file changes, not when a file is created or deleted – Jake Feb 24 '20 at 12:31

0 Answers0