blob: 30a72f9671f0445f544a714231be134999509d24 [file] [log] [blame]
import pyinotify
import sys
wm = pyinotify.WatchManager()
mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE | pyinotify.IN_MODIFY
class EventHandler(pyinotify.ProcessEvent):
def process_default(self, event):
quit()
handler = EventHandler()
notifier = pyinotify.Notifier(wm, handler)
wdd = wm.add_watch(sys.argv[1], mask, rec=True)
notifier.loop()