watch-loop
recursively watch a directory.
Install
npm install watch-loop
Usage
loop(dirname | filename, options, fn)
-
dirname | filename: can be a directory or a file name
-
options (optional): the same as options in http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener
-
callback function: with a
event
object as a argument. So you can listen tochange
andrename
method with a callback function easily.
Sample
License
MIT@chilijung