-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to monitor event when the file is closed? #367
Comments
I don't think this is possible. Programs like Microsoft word write files in an in-memory buffer. This has no interaction with the file system. When you "save" a file it either modifies or overwrites the old file with the content from the buffer. However, closing the buffer (the window) has no effect on the file system therefore cannot be detected. You're better off seeing if the program writing the file has a way for you to hook into it, and using an api call to run a method when the window closing. |
If you're dealing with Linux systems, you seem to be looking for the |
Thanks - initially, we were using inotify which have IN_CLOSE_WRITE event and it worked nice. Then we switched to watchdog because of some advanced features which inotify didn't had, but then we reverted back to inotify because of no CLOSE_WRITE mechanism. Thanks for the answers and looking forward for this implementation in watchdog. |
Finally implemented the inotify part with 2fab7c2 (will be part of the 1.0.3 version). |
Hello,
We have a problem with using Watchdog when we want to detect when the write has been finished and file is closed.
At the moment we can't do that as we are seeing "Created" when the file is initially created, and "Modified" once the file is being written to. But nothing related to "Closed".
Is there any way to monitor if the file is closed?
Thanks in advance!
The text was updated successfully, but these errors were encountered: