Skip to content

A tool that monitors changes in a directory structure using the FSEvents API.

Notifications You must be signed in to change notification settings

gulrotkake/fsmonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSMonitor

FSMonitor is an application to monitor changes in a directory structure and execute actions depending on the events captured. It's built upon the Mac OS X FSEvents API.

Usage:

fsmonitor [dir1] [dir2] [...] --add --modify --exec /myscript

Global options:

--recursive, -r : Scan directories recursively
--verbose, -v   : Be verbose about program state

Per execution options:

--add, -a    : When a file or directory is added
--modify, -m : When a file or directory is modified
--delete, -d : When a file or directory is deleted

When parsing the command line a watch flag is built using the above actions until an --exec is encountered, which will then bind that --exec to those actions and will reset the flag. This allows you to bind multiple or different actions to different scripts. For example:

fsmonitor . -a -m --exec ~/tests.sh -a -d --exec ~/updatedocs.sh

About

A tool that monitors changes in a directory structure using the FSEvents API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published