|
|
|
@@ -71,9 +71,9 @@ public class DVCUtils { |
|
|
|
Path sourceDir = Paths.get(sourcePath); |
|
|
|
Path targetDir = Paths.get(targetPath); |
|
|
|
|
|
|
|
if (!Files.exists(targetDir)) { |
|
|
|
Files.createDirectories(targetDir); |
|
|
|
} |
|
|
|
// if (!Files.exists(targetDir)) { |
|
|
|
// Files.createDirectories(targetDir); |
|
|
|
// } |
|
|
|
|
|
|
|
Files.move(sourceDir, targetDir, StandardCopyOption.REPLACE_EXISTING); |
|
|
|
} |
|
|
|
@@ -88,6 +88,8 @@ public class DVCUtils { |
|
|
|
// Files.walk(directory) |
|
|
|
// .sorted((path1, path2) -> path2.compareTo(path1)) // 先删除子文件夹,再删除父文件夹 |
|
|
|
// .forEach(this::deletePath); |
|
|
|
} else { |
|
|
|
Files.createDirectories(directory); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|