It's easy to detect a record or file change, but I can't think of a way to detect a read file. Here is the script.
Program X (with which I do not control) READS Sample.text and CHANGE it. It should be noted that program X closes the stream immediately after READ.
I have to write a program to record duration / time from READ in MODIFICATION Sample.txt. For example, program X reads Sample.txt at 5:00 PM and changes it at 7:25 pm, so the total duration is 2 hours and 25 minutes.
Is there a package or workaround to detect when / if Sample.txt was read by program X? Please note that READ is what I want to define as intended for MODIFIED, since java.nio.file can detect file modification.
source
share