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

Method autoRootPath

src/main/java/cms/utils/PathUtil.java:89–95  ·  view source on GitHub ↗

自动路径 jar启动时使用外部路径 IDE启动时使用内部路径 @return

()

Source from the content-addressed store, hash-verified

87 * @return
88 */
89 public static String autoRootPath() {
90 if(isStartupFromJar()){//jar启动
91 return defaultExternalDirectory();
92 }else{//IDE启动
93 return rootPath();
94 }
95 }
96
97 /**
98 * 判断是在jar中运行,还是IDE中运行

Callers 5

autoCreateFolderMethod · 0.95
autoWriteStringToFileMethod · 0.95
autoDeleteFileMethod · 0.95
autoRemoveDirectoryMethod · 0.95
autoRenameFileMethod · 0.95

Calls 3

isStartupFromJarMethod · 0.95
rootPathMethod · 0.95

Tested by

no test coverage detected