I'm trying to copy a file from one directory to another, but I want the call to be blocking so that the program only proceeds execution once the whole file has been transferred.
Currently I'm using Files.copy()
, which uses non-blocking IO and returns instantly. What other options (preferably built into the java standard library) do I have to solve this problem?
Many thanks, Gareth