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

Method move

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

Source from the content-addressed store, hash-verified

152 }
153
154 public static Path move(Path src, Path dest, boolean replace) throws IOException {
155 dest = getPath(dest.toString(), src.getFileName().toString());
156 if (replace) {
157 rmr(dest);
158 return Files.move(src, dest);
159 } else {
160 if (isExists(dest)) {
161 return dest;
162 } else {
163 return Files.move(src, dest);
164 }
165 }
166 }
167
168 public static void rm(Path path) throws IOException {
169 if (isExists(path)) {

Callers 1

reNameMethod · 0.80

Calls 5

getPathMethod · 0.95
rmrMethod · 0.95
isExistsMethod · 0.95
getFileNameMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected