Hi,
Here is a patch proposal to have the application being notified only when a file write is done.
Problem statement:
Our software is recieving large files from remote equipments, and it has to process the files
as soon as they have been received.
Due to network latency, file size, and storage performances, if file creation notification from
JNotify is used our software may end up processing incomplete or corrupted data. Reason
for that is that the files are not completely transferred when jnotify send the notification
about their creation
The proposed patch is solution for this problem.
Solution proposed:
In order to be notified when a file completely transferred to the watched folder, we added
a new notification fileCloseWrite() that is sent when IN_CLOSE_WRITE event is
received from the OS
Impact and limitation
Cheers
Thank you for the patch and for explaining the problem you were solving.
As this is Linux specific and JNotify is cross platform, I will hold off integrating this.
Others are of course free to patch this is they need this functionality and are only using Linux.