forked from fsnotify/fsnotify
-
Notifications
You must be signed in to change notification settings - Fork 1
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 support under Windows
This adds a new method, SetRecursive, to the Watcher structure returned by NewWatcher. It enables the Watcher to monitor subdirectories of the watched directories. Currently this functionality is only supported under Windows. Calling the SetRecursive method in all other OS-es will return an error.
- Loading branch information
Showing
4 changed files
with
37 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,9 @@ func (w *Watcher) Add(name string) error { | |
func (w *Watcher) Remove(name string) error { | ||
return nil | ||
} | ||
|
||
// SetRecursive enables watches to also monitor subdirectories. Currently | ||
// only supported under Windows. | ||
func (w *Watcher) SetRecursive() error { | ||
return nil | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
adriansr
Author
Owner
|
||
} |
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
Shouldn't this return an error?