Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Version of watch module, which is based on node-inotify.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.npmignore
LICENSE
README.md
main.js
package.json

README.md

watch-inotify

Version of watch (by Mike Rogers) module, which uses node-inotify for watching/monitoring file trees.

Usage

As in original module API is not changed, so creating of monitor is the same:

var ctrl = watch.createMonitor('/home/mikeal', function (monitor) {
    monitor.on("created", function (f, stat) {
        // handle creation
    });
    monitor.on("changed", function (f, curr, prev) {
        // handle file changes
    });
    monitor.on("removed", function (f, stat) {
        // handle deletion
    });
});

// When we are done remove all inotify watchers:
ctrl.stop();

TODO

  • Update code to use FS Events (for OS X) and make this module support both inotify and FS Events (maybe use NodeJS-FSEvents?)
Something went wrong with that request. Please try again.