I want to implement file system watcher using node.js so that it watches a particular directory for any files being added/deleted. Can somebody give an idea how to implement this?
Thanks
check out fs.watchFile(filename, [options], listener)
for the inbuilt file system watching
The core node.js watching will trigger a change event on the parent directory when a file is deleted, among other oddities. You can use Watchr to get useful events, and watching directory trees.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With