MCPcopy Create free account
hub / github.com/SeanDragon/protools / createDir

Method createDir

common/src/main/java/pro/tools/path/ToolPath.java:108–125  ·  view source on GitHub ↗
(Path path, boolean replace)

Source from the content-addressed store, hash-verified

106 }
107
108 public static Path createDir(Path path, boolean replace) throws IOException {
109 if (replace) {
110 rmr(path);
111 if (isDir(path)) {
112 path = path.getParent();
113 }
114 return Files.createDirectories(path);
115 } else {
116 if (isExists(path)) {
117 return path;
118 } else {
119 if (isDir(path)) {
120 path = path.getParent();
121 }
122 return Files.createDirectories(path);
123 }
124 }
125 }
126
127 public static Path copy(Path src, Path dest, boolean replace) throws IOException {
128 dest = getPath(dest.toString(), src.getFileName().toString());

Callers

nothing calls this directly

Calls 3

rmrMethod · 0.95
isDirMethod · 0.95
isExistsMethod · 0.95

Tested by

no test coverage detected