How to check in Node.js if a file is open/being written to?
I found many answers for C++, C#, etc. but haven't yet found one for Node.js. Here is my case. I've created a module which watches for file/directory changes (new or updated, doesn't care about deleted files) in my FTP server. Once I notice a new file, or an existing one is changed, I get a notification and notify my module B to sync this file to Sourceforge.net. The module works fine, reacts to changes instantly. But what I'm not satisfied with yet is that when a new file is added, that file receives "modified" event several times depending on the file size: the bigger the size, the more