MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / start

Method start

onjava/ProcessFiles.java:19–39  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

17 this.ext = ext;
18 }
19 public void start(String[] args) {
20 try {
21 if(args.length == 0)
22 processDirectoryTree(new File("."));
23 else
24 for(String arg : args) {
25 File fileArg = new File(arg);
26 if(fileArg.isDirectory())
27 processDirectoryTree(fileArg);
28 else {
29 // Allow user to leave off extension:
30 if(!arg.endsWith("." + ext))
31 arg += "." + ext;
32 strategy.process(
33 new File(arg).getCanonicalFile());
34 }
35 }
36 } catch(IOException e) {
37 throw new RuntimeException(e);
38 }
39 }
40 public void
41 processDirectoryTree(File root) throws IOException {
42 PathMatcher matcher = FileSystems.getDefault()

Callers 2

commandMethod · 0.45
mainMethod · 0.45

Calls 2

processDirectoryTreeMethod · 0.95
processMethod · 0.65

Tested by

no test coverage detected