When I listen to a folder, I copy a folder containing files to the monitored directory. can't listen for the update event of the folder, only the update event of the content in the folder
Now it's quite clear. I guess you're using Windows.
The native fs.watch is quite inconsistant while copying a directory:
On Linux, only one event for the root directory, no events for files.
On macOS, the order of the output events are different with different NodeJS versions.
On Windows, the event for directory is being removed due to this PR https://github.com/yuanchuan/node-watch/issues/79, which is a side-effect for this and should be removed. (I suppose it's a bug no longer exist now)
When I listen to a folder, I copy a folder containing files to the monitored directory. can't listen for the update event of the folder, only the update event of the content in the folder