yaw

YetAnotherWatch utility.

An event based file watching utility.

npm install yaw
var Watcher = require('yaw');
 
var watcher = new Watcher();
watcher.watch('some/file/or/directory')
  .on('error', function(err) {
    // Handle error 
  })
  .on('create', function(filepathstats) {
    // Handle new file or directory 
  })
  .on('change', function(filepathstats) {
    // Handle update to file 
  })
  .on('delete', function(filepath) {
    // Handle removal of file or directory 
  });