复制目录 @param resDirPath 源目录路径 @param distFolder 目标文件夹 @IOException 当操作发生异常时抛出
(String resDirPath, String distFolder)
| 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 |
no test coverage detected