Method
move
(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)) { |
Tested by
no test coverage detected