The situation in which I work is a process that writes to a file, sometimes the file is quite large, it says 400 - 500 MB. I need to know when it will be written. How can I determine this? If I look in the catalog, I will see it there, but it may not be written. In addition, this must be done remotely - as on the same internal LAN, but not on the same computer, and usually a process that wants to know when a file is being written is executed in a Linux box with a process that writes the file itself file in the window window. No samba is an option. Linking xmlrpc to a service in this window is an option, as well as using snmp to check how viable it is.
Perfectly
- It works either on Linux or on Windows - this means that the solution is OS independent.
- Works for any type of file.
Good enough:
- It only works with windows, but can be done through some library or something else that can be obtained using Python.
- Only works for PDF files.
The current best idea is to periodically open the file in question from a process in a window and look at the last bytes checking the final PDF tag and taking into account eol differences, because the file may have been created on Linux or Windows.
source
share