I maintain a tool that syncs files between a client computer and a document management server (using the CMIS protocol). Versions history (on the CMIS server) is important.When saving a document locally, MS Word:Writes to a temp file ~wrdxxxx.tmpDeletes the original file Example.docRenames ~wrdxxxx.tmp to Example.docPROBLEM: At step 2, my sync tool deletes the file on the server, loosing all versions history.QUESTION: From the point of view of my sync tool, is there a way to know whether the file has really been deleted, or whether it is just being saved?Notes:Waiting is probably not a good solution, as I can't be sure how much time steps 2 and 3 take.Cheking for the presence of ~wrdxxxx.tmp files does not work when several documents are being edited in the same folder at the same time.The tool works like Dropbox: Users don't have to commit changes, files are synchronized automatically as soon as possible.
How to distinguish whether a file is being saved or deleted? (Save in MS Word deletes then re-creates)
file handling;storage