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
-
copiedFiles
How what files have we copied? -
log
private final org.slf4j.Logger loglogger. -
from
Path we are traversing. -
to
Path where we check for Duplicates.
-
-
Constructor Details
-
LoggingVisitor
Constructor.- Parameters:
fromDir
- Path we are traversingtoDir
- Path where we check for Duplicates
-
-
Method Details
-
preVisitDirectory
- Specified by:
preVisitDirectory
in interfaceFileVisitor<Path>
- Overrides:
preVisitDirectory
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
visitFile
- Specified by:
visitFile
in interfaceFileVisitor<Path>
- Overrides:
visitFile
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
getCopiedList
did we find a name clash?- Returns:
- whether we found a name clash.
-