@ParametersAreNonnullByDefault public final class FailFastCopyVisitor extends Object implements FileVisitor<Path>
FileVisitor
for fail
fast
operation
This visitor will fail for the first directory it fails to create or the first file it fails to copy.
Constructor and Description |
---|
FailFastCopyVisitor(Path src,
Path dst)
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 FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException
preVisitDirectory
in interface FileVisitor<Path>
IOException
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
visitFile
in interface FileVisitor<Path>
IOException
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException
visitFileFailed
in interface FileVisitor<Path>
IOException
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException
postVisitDirectory
in interface FileVisitor<Path>
IOException