? CountingPathVisitor
java.lang.Object
java.nio.file.SimpleFileVisitor<Path>
org.apache.commons.io.file.SimplePathVisitor
org.apache.commons.io.file.CountingPathVisitor
- ????????:
FileVisitor<Path>
,PathVisitor
Counts files, directories, and sizes, as a visit proceeds.
- ???????:
- 2.7
-
?????
????????CountingPathVisitor
(Counters.PathCounters pathCounter) Constructs a new instance.CountingPathVisitor
(Counters.PathCounters pathCounter, PathFilter fileFilter, PathFilter dirFilter) Constructs a new instance. -
????
??????????boolean
Gets the visitation counts.int
hashCode()
postVisitDirectory
(Path dir, IOException exc) preVisitDirectory
(Path dir, BasicFileAttributes attributes) toString()
protected void
updateDirCounter
(Path dir, IOException exc) Updates the counter for visiting the given directory.protected void
updateFileCounters
(Path file, BasicFileAttributes attributes) Updates the counters for visiting the given file.visitFile
(Path file, BasicFileAttributes attributes) static CountingPathVisitor
Creates a new instance configured with a BigIntegerCounters.PathCounters
.static CountingPathVisitor
Creates a new instance configured with a longCounters.PathCounters
.??????? java.nio.file.SimpleFileVisitor
visitFileFailed
???????? java.nio.file.FileVisitor
visitFileFailed
-
???????
-
CountingPathVisitor
Constructs a new instance.- ??:
pathCounter
- How to count path visits.
-
CountingPathVisitor
public CountingPathVisitor(Counters.PathCounters pathCounter, PathFilter fileFilter, PathFilter dirFilter) Constructs a new instance.- ??:
pathCounter
- How to count path visits.fileFilter
- Filters which files to count.dirFilter
- Filters which directories to count.- ???????:
- 2.9.0
-
-
??????
-
withBigIntegerCounters
Creates a new instance configured with a BigIntegerCounters.PathCounters
.- ??:
- a new instance configured with a BigInteger
Counters.PathCounters
.
-
withLongCounters
Creates a new instance configured with a longCounters.PathCounters
.- ??:
- a new instance configured with a long
Counters.PathCounters
.
-
equals
-
getPathCounters
Gets the visitation counts.- ??:
- the visitation counts.
-
hashCode
-
postVisitDirectory
- ???:
postVisitDirectory
????FileVisitor<Path>
- ??:
postVisitDirectory
???SimpleFileVisitor<Path>
- ??:
IOException
-
preVisitDirectory
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attributes) throws IOException - ???:
preVisitDirectory
????FileVisitor<Path>
- ??:
preVisitDirectory
???SimpleFileVisitor<Path>
- ??:
IOException
-
toString
-
updateDirCounter
Updates the counter for visiting the given directory.- ??:
dir
- the visited directory.exc
- Encountered exception.- ???????:
- 2.9.0
-
updateFileCounters
Updates the counters for visiting the given file.- ??:
file
- the visited file.attributes
- the visited file attributes.
-
visitFile
- ???:
visitFile
????FileVisitor<Path>
- ??:
visitFile
???SimpleFileVisitor<Path>
- ??:
IOException
-