diff --git a/README.md b/README.md index c0ef08b..c6131a2 100644 --- a/README.md +++ b/README.md @@ -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 {