Closed cbalfour closed 8 years ago
I'd like you to adjust your implementation. Please move all original functionality to a class called BaseTree
. The InotifyTree
and InotifyTrees
classes should inherit from this. Move __load_tree
into InotifyTree
and your __load_trees
into InotifyTrees
. They'll both share the event_gen
method in the base-class.
One class should not inherit another just to mask the constructor with another version (which is never a good idea, nor is changing the method signature) as well as to replace most of the functionality. We're just moving what little is shared into a base-class. The whole thing is much more simpler/intuitive that way.
Thanks for submitting the PR. It was an insightful add.
Thanks for the constructive feedback. I'll implement your suggestions and do a new PR.
Any chances of this getting merged? I could actually use this feature.
See #18.
I needed to be able to recursively monitor a few paths which are not located off a common root. InotifyTree can only take a single path.
Added InotifyTrees class with new constructor and __load_trees() method to add a list of paths to be monitored.