@ParametersAreNonnullByDefault public final class KeepGoingCopyVisitor extends Object implements FileVisitor<Path>
FileVisitor for keep going operation
This visitor will collect all IOExceptions it encounters and add
them (as a suppressed exception)
to the RecursiveCopyException argument.
| Constructor and Description |
|---|
KeepGoingCopyVisitor(Path src,
Path dst,
RecursiveCopyException exception)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
FileVisitResult |
postVisitDirectory(Path dir,
IOException exc) |
FileVisitResult |
preVisitDirectory(Path dir,
BasicFileAttributes attrs) |
FileVisitResult |
visitFile(Path file,
BasicFileAttributes attrs) |
FileVisitResult |
visitFileFailed(Path file,
IOException exc) |
public KeepGoingCopyVisitor(Path src, Path dst, RecursiveCopyException exception)
src - the source to copy recursivelydst - the destination of the copyexception - the exception to collect other exceptionspublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException
preVisitDirectory in interface FileVisitor<Path>IOExceptionpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
visitFile in interface FileVisitor<Path>IOExceptionpublic FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException
visitFileFailed in interface FileVisitor<Path>IOExceptionpublic FileVisitResult postVisitDirectory(Path dir, @Nullable IOException exc) throws IOException
postVisitDirectory in interface FileVisitor<Path>IOException