emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
5.01k stars 326 forks source link

-x option: possible bug? #144

Closed JSB97 closed 7 years ago

JSB97 commented 7 years ago

Making use of # fswatch 1.9.2, with the following command in directory ./tmp.

$ fswatch -x .

When copying a file from another directory to ./tmp, I get the following output;

$ cp somedir/PDF.pdf ./tmp
# somepath/tmp/PDF.pdf Created Removed Updated OwnerModified AttributeModified IsFile

When deleting the same file in ./tmp, I get below;

$ rm  ./tmp/PDF.pdf
# somepath/tmp/PDF.pdf Created Removed Updated OwnerModified AttributeModified IsFile

I would have expected to see Created IsFile when running cp and Removed IsFile upon execution of rm, but is there a reason why I don't observe this?

emcrisostomo commented 7 years ago

Are you running fswatch on OS X? OS X may return event flags of previous events for the same file if they occur sufficiently close in time.