Watch for file edit
Posted on 2005-04-21
I need to watch from Java, how the user is editing a file, and take an action (upload back to the web site), when he is done.
If he uses MS Office, it locks the file, so I plan to try putting a Java lock on the file until I succedd. Any details would be helpful.
if he is editing a text file, I could rename it to file.txt.doc, as a hack, and open in Word, but this is less than perfect solution.
I know that Winzip somehow watches for a file to change, and adds it back to the archive. But I am hesitant to start a watching thread - because it may then work forever. User will eventually close a Zip file, but my application stays.