Search code examples
pythonfreebsdkqueue

Detect file creation or deletion under given path using python and kqueue on FreeBSD


Given /certain/path/ on a FreeBSD system, I would like python to use kqueue to detect if any files are created or deleted anywhere under that path.

How would I do this?


Solution

  • You can try the watchdog package which in turn uses kqueue on BSD (and inotify on Linux, etc.)