nak
Version:
ack and ag inspired tool written in Node. Designed to be fast.
23 lines (19 loc) • 491 B
Plain Text
this._onChange = function(event) {
var self = this;
if (!this.watcher)
return;
this.vfs.stat(this.path, {}, function(err, stat) {
var exists = !err && stat && !stat.err;
if (!exists) {
self.emit("dedelete", {
path: self.path
});
self.close();
} else {
self.emit("change", {
path: self.path,
lastmod: stat.mtime
});
}
});
};