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

Method autoCreateFolder

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

生成文件夹 自动路径 jar启动时使用外部路径 IDE启动时使用内部路径 @param path 路径

(String path)

Source from the content-addressed store, hash-verified

587 * @param path 路径
588 */
589 public static Boolean autoCreateFolder(String path){
590
591 //生成文件目录
592 File dirFile = new File(PathUtil.autoRootPath()+File.separator+path);
593 if (!(dirFile.exists()) && !(dirFile.isDirectory())){
594 dirFile.mkdirs();
595 return true;
596 }
597 return false;
598 }
599 /**
600 * 写文件(如果目标文件不存在,FileUtils会自动创建) 自动路径 jar启动时使用外部路径 IDE启动时使用内部路径
601 * @param path 路径

Callers

nothing calls this directly

Calls 1

autoRootPathMethod · 0.95

Tested by

no test coverage detected