emcrisostomo / fsw

A file change monitor with multiple backends: Apple OS X File System Events API, *BSD kqueue, Linux inotify and a stat-based backend.
http://emcrisostomo.github.io/fsw/
GNU General Public License v3.0
43 stars 7 forks source link

Support executing a command on changed event #11

Closed remko closed 9 years ago

remko commented 9 years ago

fswatch's documentation claims to be able to run a command when files change. Looking at the code, it doesn't seem like it does, but it would have been a useful feature anyway (maybe it used to support it). I want to trigger actions when files change.

remko commented 9 years ago

Found the other fswatch.

emcrisostomo commented 9 years ago

Hi @remko.

Yes, in fact fsw has merged with fswatch. By the way, neither is able to run a command: the first fswatch iterations had this feature but it was dropped. Now, fswatch prints change events that you can use as triggers.

remko commented 9 years ago

Thanks @emcrisostomo. I worked it out from the example, it solved my problem.