Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recursive watcher for Windows backend
Recursive watches can be added by using a "/..." parameter, similar to the Go command: w.Add("dir") // Behaves as before. w.Add("dir/...") // Watch dir and all paths underneath it. w.Remove("dir") // Remove the watch for dir and, if // recursive, all paths underneath it too w.Remove("dir/...") // Behaves like just "dir" if the path was // recursive, error otherwise (probably // want to add recursive remove too at some // point). The advantage of using "/..." vs. an option is that it can be easily specified in configuration files and the like; for example from a TOML file: [watches] dirs = ["/tmp/one", "/tmp/two/..."] Options for this were previously discussed at: #339 (comment) This should be expanded to other backends too; I started with Windows because the implementation is the both the easiest and has the least amount of control (just setting a boolean parameter), and we can focus mostly on writing tests and documentation and the for it, and we can then match the inotify and kqueue behaviour to the Windows one. Fixes #21
- Loading branch information
Showing
11 changed files
with
254 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.