Watching for file changes on complete file transfer
I have a simple node script that looks for a file changes and copies file to the remote server using ssh. fs.watch(filename,function(curr,prev){ //copy file to the remote server }); However, since the file i'm watching is uploaded via ftp and for every chunk of data i recieve the file gets changed and the callback gets fired. Is there any way to look for changes only when the complete file has been transfered? Thanks in advance. I know this is an old question but for anyone else in the same situation there is now the below module: https://www.npmjs.com/package/remote-file-watcher For Linux,