MCPcopy Create free account
hub / github.com/diyhi/bbs / copyDirectory

Method copyDirectory

src/main/java/cms/utils/FileUtil.java:454–463  ·  view source on GitHub ↗

复制目录 @param resDirPath 源目录路径 @param distFolder 目标文件夹 @IOException 当操作发生异常时抛出

(String resDirPath, String distFolder)

Source from the content-addressed store, hash-verified

452 * @IOException 当操作发生异常时抛出
453 */
454 public static void copyDirectory(String resDirPath, String distFolder) throws IOException {
455
456 File copyDir = new File(PathUtil.defaultExternalDirectory()+File.separator+resDirPath);
457 File distFile = new File(PathUtil.defaultExternalDirectory()+File.separator+(distFolder == null || distFolder.trim().isEmpty() ? "" :distFolder+File.separator));
458
459 if (copyDir.isDirectory()) {
460 FileUtils.copyDirectoryToDirectory(copyDir, distFile);
461 }
462
463 }
464 /**
465 * 复制资源目录(spring boot 打包的资源目录下的文件 复制到外部目录)
466 * @param resDirPath 源目录路径 WEB-INF/foregroundView/templates

Callers 2

editHelpMethod · 0.45
moveHelpMethod · 0.45

Calls 2

isEmptyMethod · 0.45

Tested by

no test coverage detected