Created
July 22, 2011 22:11
-
-
Save adamrabung/1100549 to your computer and use it in GitHub Desktop.
java7 file system walker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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