Removes the given file or directory.
(File src, File dst)
| 86 | |
| 87 | /** Removes the given file or directory. */ |
| 88 | public void copy(File src, File dst) { |
| 89 | run(() -> { |
| 90 | if (!src.exists()) { |
| 91 | throw new IllegalArgumentException("copy failed: " + src.getAbsolutePath() + " does not exist."); |
| 92 | } |
| 93 | |
| 94 | if (src.isDirectory()) { |
| 95 | FileUtils.copyDirectory(src, dst); |
| 96 | } else { |
| 97 | FileUtils.copyFile(src, dst); |
| 98 | } |
| 99 | }); |
| 100 | } |
| 101 | |
| 102 | /** Removes the given file or directory. */ |
| 103 | public void mv(File src, File dst) { |