MCPcopy Create free account
hub / github.com/diffplug/goomph / mv

Method mv

src/main/java/com/diffplug/gradle/CmdLine.java:103–115  ·  view source on GitHub ↗

Removes the given file or directory.

(File src, File dst)

Source from the content-addressed store, hash-verified

101
102 /** Removes the given file or directory. */
103 public void mv(File src, File dst) {
104 run(() -> {
105 if (!src.exists()) {
106 throw new IllegalArgumentException("mv failed: " + src.getAbsolutePath() + " does not exist.");
107 }
108
109 if (src.isDirectory()) {
110 FileUtils.moveDirectory(src, dst);
111 } else {
112 FileUtils.moveFile(src, dst);
113 }
114 });
115 }
116
117 /** Removes the given file or directory. */
118 public void run(Throwing.Runnable action) {

Callers

nothing calls this directly

Calls 1

runMethod · 0.95

Tested by

no test coverage detected