I am trying to find a cross-platform way of reliably describing whether the file ended with copying (external process).
Earlier on OSX / Linux I just checked
File file = new File("path/to/file"); file.length()
then wait a few seconds and check it again to see if it has changed.
However, this does not work on Windows, since the method always returns the size of the full file (that is, in the end, it will be copied one day).
I also tried checking the lastModified timestamp, but that didn't change either.
source share