public final class KeepGoingDeletionVisitor extends Object implements FileVisitor<Path>
FileVisitor for keep going
operation
This visitor will collect all IOExceptions it encounters into the
RecursiveDeletionException argument (as a suppressed exception).
| Constructor and Description |
|---|
KeepGoingDeletionVisitor(Path victim,
RecursiveDeletionException 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 KeepGoingDeletionVisitor(Path victim, RecursiveDeletionException exception)
victim - the path to delete recursivelyexception - the exception to add suppressed exceptions topublic 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