@ParametersAreNonnullByDefault public final class FailFastDeletionVisitor extends Object implements FileVisitor<Path>
FileVisitor for fail fast
operation
This visitor will fail at the first entry it fails to delete.
| Constructor and Description |
|---|
FailFastDeletionVisitor(Path victim)
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 FailFastDeletionVisitor(Path victim)
victim - the path to deletepublic 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, IOException exc) throws IOException
postVisitDirectory in interface FileVisitor<Path>IOException