public class TreeDeleter extends Object implements FileVisitor<Path>
FileVisitor that deletes a file tree.| Constructor and Description |
|---|
TreeDeleter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteDir(Path source)
Deeply deletes the directory given by
source. |
FileVisitResult |
postVisitDirectory(Path dir,
IOException exception) |
FileVisitResult |
preVisitDirectory(Path dir,
BasicFileAttributes attributes) |
FileVisitResult |
visitFile(Path file,
BasicFileAttributes attributes) |
FileVisitResult |
visitFileFailed(Path file,
IOException exception) |
public static void deleteDir(Path source) throws IOException
source.source - The source directory.IOExceptionpublic FileVisitResult visitFile(Path file, BasicFileAttributes attributes) throws IOException
visitFile in interface FileVisitor<Path>IOExceptionpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attributes) throws IOException
preVisitDirectory in interface FileVisitor<Path>IOExceptionpublic FileVisitResult postVisitDirectory(Path dir, IOException exception) throws IOException
postVisitDirectory in interface FileVisitor<Path>IOExceptionpublic FileVisitResult visitFileFailed(Path file, IOException exception)
visitFileFailed in interface FileVisitor<Path>Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.