? AccumulatorPathVisitor

????????:
FileVisitor<Path>, PathVisitor

Accumulates normalized paths during visitation.

Use with care on large file trees as each visited Path element is remembered.

Example

 Path dir = Paths.get("");
 // We are interested in files older than one day
 long cutoff = System.currentTimeMillis() - (24 * 60 * 60 * 1000);
 AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new AgeFileFilter(cutoff));
 //
 // Walk one dir
 Files.walkFileTree(dir, Collections.emptySet(), 1, visitor);
 System.out.println(visitor.getPathCounters());
 System.out.println(visitor.getFileList());
 //
 visitor.getPathCounters().reset();
 //
 // Walk dir tree
 Files.walkFileTree(dir, visitor);
 System.out.println(visitor.getPathCounters());
 System.out.println(visitor.getDirList());
 System.out.println(visitor.getFileList());
 
???????:
2.7