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