MCPcopy Create free account
hub / github.com/Ppsoft1991/CodeReviewTools / ClearScan

Class ClearScan

src/main/java/ppsoft1991/Scanner/unzip/ClearScan.java:13–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11import java.util.stream.Stream;
12
13public class ClearScan implements IScan {
14 @Override
15 public void scan(String dir, String fileName) throws Exception {
16 try (Stream<Path> paths = Files.walk(Paths.get(dir))) {
17 paths.map(Path::toString).filter(f -> f.endsWith(".class"))
18 .collect(Collectors.toList())
19 .forEach(c-> (new File(c)).delete());
20 } catch (IOException e) {
21 e.printStackTrace();
22 }
23 System.out.println("Clear模式结束");
24 }
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected