Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to register a directory recursively? #2

Open
klauern opened this issue Jan 16, 2013 · 3 comments
Open

How to register a directory recursively? #2

klauern opened this issue Jan 16, 2013 · 3 comments

Comments

@klauern
Copy link

klauern commented Jan 16, 2013

I know that by default, Java's watch service won't register directories under a path recursively, but how would I go about doing that with this library?

@rplevy-draker
Copy link
Contributor

I think that would be a good feature to add.

@rplevy-draker
Copy link
Contributor

Just to be a little more clear, it's part of a category of useful functionality that I intend to add, namely "multiple watchers". I have not implemented multiple watchers yet because I did not need it for my specific use case. It's trivial except for how it changes the work-queue code, which involves some design decisions I will want to consider in more detail.

I think the recursive case should actually just be an option (like parallel mode), and when it is selected, watchers are defined internally for each subdirectory.

@klauern
Copy link
Author

klauern commented Jan 18, 2013

Yeah, I'm with you on that. I was using Java's WatchService to write a similar library and was hoping someone had a clean way to handle it. I was stumbling on whether I wanted to differentiate between setup and runtime directory registration, since I would have to register directories created as they are evented in addition to walking the tree at startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants