Package nl.knaw.dans.bagit.verify
Class FileCountAndTotalSizeVistor
- All Implemented Interfaces:
FileVisitor<Path>
Implements
SimpleFileVisitor to ensure that the encountered file is in one of the manifests.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate static final org.slf4j.Loggerprivate static final ResourceBundleprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetCount()longpreVisitDirectory(Path dir, BasicFileAttributes attrs) visitFile(Path path, BasicFileAttributes attrs) Methods inherited from class java.nio.file.SimpleFileVisitor
postVisitDirectory, visitFileFailed
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
messages
-
totalSize
private transient long totalSize -
count
private transient long count
-
-
Constructor Details
-
FileCountAndTotalSizeVistor
public FileCountAndTotalSizeVistor()
-
-
Method Details
-
preVisitDirectory
- Specified by:
preVisitDirectoryin interfaceFileVisitor<Path>- Overrides:
preVisitDirectoryin classSimpleFileVisitor<Path>- Throws:
IOException
-
visitFile
- Specified by:
visitFilein interfaceFileVisitor<Path>- Overrides:
visitFilein classSimpleFileVisitor<Path>- Throws:
IOException
-
getCount
public long getCount() -
getTotalSize
public long getTotalSize()
-