@Test public void testWalkOnExistingFile() throws IOException { final File file = new File(baseLocation, "file.txt"); Files.walkFileTree(file.toPath(), visitor); assertFalse(visitor.getPaths().isEmpty()); assertEquals(file.toPath(), visitor.getPaths().get(0)); }
public List<Path> getPaths() { return paths; }
ListFilesFileVisitor extends SimpleFileVisitor<Path> { public List<Path> getPaths() { return paths; } }
ListFilesFileVisitor extends SimpleFileVisitor<Path> { public List<Path> getPaths() { return paths; }  }
ListFilesFileVisitor extends SimpleFileVisitor<Path> { public List<Path> getPaths() { return paths; }  List<Path> getPaths(); List<File> getFiles(); @Override FileVisitResult visitFile(Path file, BasicFileAttributes attrs); @Override FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs); @Override FileVisitResult postVisitDirectory(Path dir, IOException exc); }
ListFilesFileVisitor extends SimpleFileVisitor<Path> { public List<Path> getPaths() { return paths; }  List<Path> getPaths(); List<File> getFiles(); @Override FileVisitResult visitFile(Path file, BasicFileAttributes attrs); @Override FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs); @Override FileVisitResult postVisitDirectory(Path dir, IOException exc);  }