3

I am trying to use the Java 7 WatchService to watch for new zip files in a specific directory and extracting them after the file is completely written. I got the notification that the file is created but now I have to wait until this file is completely written so I can actually extract it. Any suggestions how to do this? Is there a good way/best practice to do this or should I simple retry to open/validate the zip until this success?

Best regards, Chris

Chris S.
  • 323
  • 1
  • 4
  • 13
  • Possible duplicate of [How to test if a file is "complete" with Java](http://stackoverflow.com/questions/10029365/how-to-test-if-a-file-is-complete-with-java) – Robby Cornelissen Oct 28 '16 at 10:13
  • Take a look at: http://stackoverflow.com/questions/3369383/java-watching-a-directory-to-move-large-files – Assaf Azaria May 10 '17 at 09:22

0 Answers0