slow to the extent that I stopped trying to fix its problems and wrote
a new implementation instead.
+One difference is that pyinotify has a callback based API in which you
+define callbacks or methods that are called when a specific event happens,
+forcing an event-driven programmig style. Python-inotify has an API that
+allows you to use a blocking `Watcher.read()` call.
You can find pyinotify at http://pyinotify.sourceforge.net/
for evt in inotify.read(self.fd, bufsize):
event = Event(evt, None if evt.wd == -1 else self._wds[evt.wd])
- if evt.
mask & inotify.IN_IGNORED:
- elif evt.
mask & inotify.IN_UNMOUNT:
callable that takes one parameter. It will be called each time
a directory is about to be automatically watched. If it returns
True, the directory will be watched if it still exists,
- otherwise, it will be
+ otherwise, it will be skipped.'''
self.addfilter = addfilter