howeyc/fsnotify — pull request #79 by abustany (2013-12-24 11:54:51+00:00)
Title: Add an IsAttrib method on the FileEvent struct

This IsAttrib function can be used to distinguish events that only
concern a file's metadata (eg. atime, mtime etc.).

The background for this commit is an app that I have which
monitors a folder, and reads new files that get copied there. On
OS X (at least, I don't get the same behaviour on Linux with a FS
mounted with the relatime option), reading the file will update the
atime and trigger a new event (creating a loop since then the app
will read the file again, and so on). The IsAttrib method allows me
to filter out attribute events.

Testing has been done on OS X and Linux.