Detect if a file is added instead of modified in Nodejs

564 views Asked by At

I am writing a program in node to detect the files added to a disk. I can not use chokidar for the entire disk, it takes a long time if there is a lot of information. I am mixing chokidar with node-watch, when node-watch detects a file I add it to chokidar and I can follow the file. The problem is that node-watch detects only the updates (modification and creation) and I need to add the file to chikidar only if it did not exist (creation), but it is also added if it is updated. How could I detect only the files that are copied? Thanks in advance.

0

There are 0 answers