You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and watchgopher is told to watch the parent directory when a file gets created in subdir1 then watchgopher will take the same action that it would for the parent. I know I can add the subdirectories to the json config file and have the actions all the same, but parent directory I am working with has a lot of subdirectories and I would constantly have to make changes to the configuration.
The text was updated successfully, but these errors were encountered:
At the moment it is not possible to recursively watch a directory. The reason is that Watchgopher uses fsnotify (github.com/howeyc/fsnotify) to keep track of file changes and fsnotify itself doesn't support recursive watching. I didn't want to put that feature on top of fsnotify in watchgopher. If you want to hack on Watchgopher and add that feature: feel free to send a pull request, as I might not get around to it soon :)
Also check out this issue: howeyc/fsnotify#56 which contains a lot of useful information regarding that topic. Hint: os/notify is planned to be included in Go 1.4 and is based on howeyc/fsnotify.
Thanks for getting back to me, I did not realize that it was a limitation
in fsnotify. I have subscribed to that issue and hope to see it
implemented in either howeyc/fsnotiy or os/notify in 1.4.
Is it possible to have watchgopher recursively watch a directory for changes? For example if I have the following directory structure:
and watchgopher is told to watch the parent directory when a file gets created in subdir1 then watchgopher will take the same action that it would for the parent. I know I can add the subdirectories to the json config file and have the actions all the same, but parent directory I am working with has a lot of subdirectories and I would constantly have to make changes to the configuration.
The text was updated successfully, but these errors were encountered: