Package org.spongepowered.api.util.file
Class DeleteFileVisitor
- All Implemented Interfaces:
FileVisitor<Path>
Represents a
FileVisitor
which will recursively delete a directory
with all its contents.
Example usage:
Files.walkFileTree(dir, DeleteFileVisitor.INSTANCE);
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionpostVisitDirectory
(Path dir, IOException exc) visitFile
(Path file, BasicFileAttributes attrs) Methods inherited from class java.nio.file.SimpleFileVisitor
preVisitDirectory, visitFileFailed
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DeleteFileVisitor
protected DeleteFileVisitor()
-
-
Method Details
-
visitFile
- Specified by:
visitFile
in interfaceFileVisitor<Path>
- Overrides:
visitFile
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
postVisitDirectory
- Specified by:
postVisitDirectory
in interfaceFileVisitor<Path>
- Overrides:
postVisitDirectory
in classSimpleFileVisitor<Path>
- Throws:
IOException
-