There are several common uses of Files walkFileTree method. 1. Finding File import java . io . IOException ; import java . nio . file .*; import java . nio . file . attribute .*; class FileFindVisitor extends SimpleFileVisitor < Path > { private PathMatcher matcher ; public FileFindVisitor ( String pattern ){ try { matcher = FileSystems . getDefault (). getPathMatcher ( pattern ); } catch ( IllegalArgumentException e ) { e . printStackTrace (); } } public FileVisitResult visitFile ( Path path , BasicFileAttributes fileAttributes ){ find ( path ); ...
Software Engineering experiences and best practices