Class LoggingVisitor
- All Implemented Interfaces:
FileVisitor<Path>
A @{link
FileVisitor copies directory trees keeping a note of all copied target files.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDid we find a name clash?preVisitDirectory(Path dir, BasicFileAttributes attrs) visitFile(Path file, BasicFileAttributes attrs) Methods inherited from class java.nio.file.SimpleFileVisitor
postVisitDirectory, visitFileFailed
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger loglogger. -
copiedFiles
How what files have we copied? -
from
Path we are traversing. -
to
Path where we copy to.
-
-
Constructor Details
-
LoggingVisitor
Constructor.- Parameters:
fromDir- Path we are traversingtoDir- Path where we check for Duplicates
-
-
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
-
getCopiedList
Did we find a name clash?- Returns:
- whether we found a name clash
-