I apologise if this is the wrong place to post this question.
When I use "add" event for watching a folder with Chokidar all existing files are listed as added.
My platform is OSX.
Is this the correct behavior?
How can I prevent existing files from being listed and only show files that gets added?
The "change" event works as expected.
var watcher = chokidar.watch('/My/path', {
ignored: /[\/\\]\./,
persistent: true
});
watcher
.on('change', function(path) { console.log("File " + path + " has been changed"); })
.on('add', function(path) { console.log("File " + path + " has been added"); });
I'm using [email protected]
/Christian
ignoreInitial: true
Great, thanks
Most helpful comment
ignoreInitial: true