(String[] args)
| 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() |
no test coverage detected