MCPcopy
hub / github.com/RimoChan/match-you / clean

Method clean

mother.java:31–51  ·  view source on GitHub ↗
(String goal)

Source from the content-addressed store, hash-verified

29 }
30
31 public static void clean(String goal) {
32 try {
33 Files.walkFileTree(Paths.get(goal), new SimpleFileVisitor<>() {
34 @Override
35 public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
36 Files.delete(file);
37 return FileVisitResult.CONTINUE;
38 }
39
40 @Override
41 public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
42 if (exc == null) {
43 Files.delete(dir);
44 }
45 return FileVisitResult.CONTINUE;
46 }
47 });
48 } catch (Exception ignored) {
49
50 }
51 }
52}

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected