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

Method copy

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

Source from the content-addressed store, hash-verified

125 }
126
127 public static Path copy(Path src, Path dest, boolean replace) throws IOException {
128 dest = getPath(dest.toString(), src.getFileName().toString());
129 if (replace) {
130 rmr(dest);
131 return Files.copy(src, dest);
132 } else {
133 if (isExists(dest)) {
134 return dest;
135 } else {
136 return Files.copy(src, dest);
137 }
138 }
139 }
140
141 public static Path createFile(Path path, boolean replace) throws IOException {
142 if (replace) {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected