Ignore CHMOD-only changes; this works around a macOS issue that Spotlight
likes to touch files again immediately after they've been touched (and I
normally don't care about attribute changes; only additions and deletions).
Coalesce rapid sequences of changes over a configurable threshold: this helps
in various scenarios, such as editors writing out via temp files.
Warning
This is a library I wrote purely for my own needs and I'm pretty sure it has
some bugs. Or maybe fsnotify has some bugs. The whole file system notification
thing has all kinds of fun flakiness, in my experience.
fswatch is a small Go library that builds on top of
github.com/fsnotify/fsnotify and adds a few commonly-needed extra features,
including recursive watches.