a_watcher

just a watcher class. do whatever you want with it.

npm install a_watcher
4 downloads in the last week
9 downloads in the last month

AWatcher, watches the given directory, subdirectories and files for events - by Amit Marcus - 2013 - enjoy - MIT License and such.

example: -

var AWatcher = require('a_watcher');
var aWatcher = new AWatcher('path/to/watch', function(event, item){
    if (event === 'change'){
        console.log(item + ' was just changed!');
    }
});

methods & more: - aWatcher.close() # stops the watcher aWatcher.list # array of watched items aWatcher.watchers # object that holds {item: fs.FSWatcher}

notice: - for directories it will trigger 'add'/'remove' and for files it will also trigger 'change'

install: - npm install a_watcher

npm loves you