yolowatch
Watch changes to subdirectories and subfiles within a given directory.
Uses the filewatcher
module to fall back on polling the filesystem when ulimit is reached.
npm install yolowatch
Example
var yolowatch = var watcher = watcher watcher watcher watcher // remove all listeners
Example data
in callback (see folder-walker):
{
basename: 'index.js',
relname: 'test/index.js',
root: '/Users/karissa/dev/node_modules/folder-walker',
filepath: '/Users/karissa/dev/node_modules/folder-walker/test/index.js',
stat: [fs.Stat Object],
type: 'file' // or 'directory'
}
Options
- Second argument,
opts
, is passed to filewatcher. - Ignore files:
opts.filter
passed to folder-walker.