Open roma-glushko opened 1 year ago
Hello 👋
First off, thank you for showing interest in this project!
My initial motivation for creating this project was to make it easier to create an encrypted mirror of a few directories, so recursive usage was in mind.
During the design of PyNotify, though, I decided against including recursive capabilities. This was mostly because it should be relatively easy to implement on the consumer side, but also because it breaks the current level of abstraction. The library is currently an one layer above inotify (sending to handlers), whereas recursiveness implies another layer above (handling events).
I'm not against implementing recursiveness, I'm just providing the reasoning behind it not being implemented already. Perhaps an extra module to implement common tasks like this could create the separation of concerns desired?
Hey folks 👋
Is it possible to watch the directory recursively? So when I do
watch("/home/roma/")
, I receive events from:/home/roma/*
files per se/home/roma/docs
and any other existing subdirectory of the path/home/roma/justaddeddir/*
- any new directory created after we have started watching the root dirI assume that this is a common case for
inotify
usage and would be great to have inpynotify
.Thank you in advance!