mirror of
https://github.com/go-task/task.git
synced 2026-07-01 08:34:19 +00:00
Update vendor/
This commit is contained in:
10
vendor/github.com/radovskyb/watcher/README.md
generated
vendored
10
vendor/github.com/radovskyb/watcher/README.md
generated
vendored
@@ -15,7 +15,8 @@ Events contain the `os.FileInfo` of the file or directory that the event is base
|
||||
[Watcher Command](#command)
|
||||
|
||||
# Update
|
||||
Event.Path for Rename and Move events is now returned in the format of `fromPath -> toPath`
|
||||
- Added new file filter hooks (Including a built in regexp filtering hook) [Dec 12, 2018]
|
||||
- Event.Path for Rename and Move events is now returned in the format of `fromPath -> toPath`
|
||||
|
||||
#### Chmod event is not supported under windows.
|
||||
|
||||
@@ -68,6 +69,11 @@ func main() {
|
||||
// Only notify rename and move events.
|
||||
w.FilterOps(watcher.Rename, watcher.Move)
|
||||
|
||||
// Only files that match the regular expression during file listings
|
||||
// will be watched.
|
||||
r := regexp.MustCompile("^abc$")
|
||||
w.AddFilterHook(watcher.RegexFilterHook(r, false))
|
||||
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
@@ -128,6 +134,8 @@ Usage of watcher:
|
||||
command to run when an event occurs
|
||||
-dotfiles
|
||||
watch dot files (default true)
|
||||
-ignore string
|
||||
comma separated list of paths to ignore
|
||||
-interval string
|
||||
watcher poll interval (default "100ms")
|
||||
-keepalive
|
||||
|
||||
Reference in New Issue
Block a user