- java.lang.Object
-
- java.nio.file.SimpleFileVisitor<Path>
-
- eu.ess.xaos.core.util.io.DeleteFileVisitor
-
- All Implemented Interfaces:
FileVisitor<Path>
public class DeleteFileVisitor extends SimpleFileVisitor<Path>
AFileVisitor
that will delete a file tree. Each directory will be deleted after the entries in the directory are deleted.Usage:
Path root = ... Files.walkFileTree(root, new DeleteFileVisitor());
- Author:
- claudio.rosati@esss.se
-
-
Constructor Summary
Constructors Constructor Description DeleteFileVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileVisitResult
postVisitDirectory(Path dir, IOException e)
FileVisitResult
visitFile(Path file, BasicFileAttributes attrs)
-
Methods inherited from class java.nio.file.SimpleFileVisitor
preVisitDirectory, visitFileFailed
-
-
-
-
Method Detail
-
postVisitDirectory
public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException
- Specified by:
postVisitDirectory
in interfaceFileVisitor<Path>
- Overrides:
postVisitDirectory
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
visitFile
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
- Specified by:
visitFile
in interfaceFileVisitor<Path>
- Overrides:
visitFile
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
-