If you don't know the file size, you could use node-growing-file https://github.com/felixge/node-growing-file
It uses a timeout to determine if a file is finished growing or not. On Tuesday, February 28, 2012 12:11:29 PM UTC-7, Naouak wrote: > > Hi, > > My aim is to do an automatic operation on files dropped into a directory > over the network. > > To be sure that no one try to modify that file during the execution of the > operation, I want to move it from the drop area to another dir. With > fs.watch I'm able to tell when a new file arrives with the rename event. > The problem is when the transfer is not fast enough, I will get the event > before the file has finished transfer. > > So my question is : Is there a way to know if transfer is done before > doing anything ? > > Thanks for your answers, > > Naouak, Grade 2 de Kobal. > Site web: http://www.naouak.net > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
