Skip to content

Instantly share code, notes, and snippets.

@adamrabung
Created July 22, 2011 22:11
Show Gist options
  • Save adamrabung/1100549 to your computer and use it in GitHub Desktop.
Save adamrabung/1100549 to your computer and use it in GitHub Desktop.
java7 file system walker
// register directory and sub-directories
Files.walkFileTree(start, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
register(dir);
return FileVisitResult.CONTINUE;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment