使用Files.copy()方法复制目录
import java.io.IOException;/** 来自 时代Java - nowjava.com**/ import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static void main(String[] args) { Path originalDirectory = FileSystems.getDefault().getPath("C:/home/docs"); Path newDirectory = FileSystems.getDefault().getPath("C:/home/tmp"); try { Files.copy(originalDirectory, newDirectory); System.out.println(