I am trying to copy multiple files to the output directory in Java 7 using Path and Files. This does not work:
Files.copy(Paths.get("/my/file.txt"), Paths.get("/my/output/directory/");
It generates a "directory not empty" error.
Yes, I could write code to directly name the output file, or use Guava, but I'm trying to do this in the easiest way using the new Java 7 nio classes.
source share