Package org.jppf.utils
Class DeleteFileVisitor
- All Implemented Interfaces:
FileVisitor<Path>
A file walker that deletes a complete file and folder hierarchy.
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize without a matcher.DeleteFileVisitor(PathMatcher fileMatcher) Initialize with the specified path matcher.DeleteFileVisitor(PathMatcher fileMatcher, PathMatcher dirMatcher) Initialize with the specified file and directory path matchers. -
Method Summary
Modifier and TypeMethodDescriptionpostVisitDirectory(Path dir, IOException e) visitFile(Path file, BasicFileAttributes attrs) Methods inherited from class java.nio.file.SimpleFileVisitor
preVisitDirectory, visitFileFailed
-
Constructor Details
-
DeleteFileVisitor
public DeleteFileVisitor()Initialize without a matcher. -
DeleteFileVisitor
Initialize with the specified path matcher.- Parameters:
fileMatcher- an optional path matcher to filter the files to delete.
-
DeleteFileVisitor
Initialize with the specified file and directory path matchers.- Parameters:
fileMatcher- an optional path matcher to filter the files to delete.dirMatcher- an optional path matcher to filter the directories to delete.
-
-
Method Details
-
visitFile
- Specified by:
visitFilein interfaceFileVisitor<Path>- Overrides:
visitFilein classSimpleFileVisitor<Path>- Throws:
IOException
-
postVisitDirectory
- Specified by:
postVisitDirectoryin interfaceFileVisitor<Path>- Overrides:
postVisitDirectoryin classSimpleFileVisitor<Path>- Throws:
IOException
-