(Path src, Path dest, boolean replace)
| 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) { |
nothing calls this directly
no test coverage detected