Open HRK44 opened 5 years ago
Ubuntu 18.04.1
The add event is not triggering on folder creating, same for unlink.
add
unlink
let rootWatcher = new INotifyWait(dir, { recursive: true }); rootWatcher.on('ready', () => console.log('watching now...')); rootWatcher.on('add', (filename, stats) => console.log('new file created : ' + filename)); rootWatcher.on('unknown', filename => console.log('unknown event...')); rootWatcher.on('unlink', filename => { console.log('deleted file : ' + filename); // rootWatcher.close(); });
Never mind, there is the option watchDirectory that you have to set to true for this to happen. Not mentioned anywhere on the README.md
watchDirectory
true
Ubuntu 18.04.1
The
add
event is not triggering on folder creating, same forunlink
.