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.