I need to monitor (using watchdog) a single file, not a whole directory.
What is the best way to avoid monitoring a whole directory? I suppose this
class watchdog.events.PatternMatchingEventHandler(patterns=None, ignore_patterns=None, ignore_directories=False, case_sensitive=False)[source]
could be helpful, but how to define an appropriate pattern for my file (C:/dir1/dir2/file.txt)?