- 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>
AFileVisitorthat 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 FileVisitResultpostVisitDirectory(Path dir, IOException e)FileVisitResultvisitFile(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:
postVisitDirectoryin interfaceFileVisitor<Path>- Overrides:
postVisitDirectoryin classSimpleFileVisitor<Path>- Throws:
IOException
-
visitFile
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
- Specified by:
visitFilein interfaceFileVisitor<Path>- Overrides:
visitFilein classSimpleFileVisitor<Path>- Throws:
IOException
-
-