Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
radovskyb committed Dec 12, 2018
1 parent cfaa0d6 commit 59f4c52
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 59f4c52

Please sign in to comment.