- All Implemented Interfaces:
FileVisitor<Path>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidforceDeleteIfExists(Path path) Tries to remove any write protection of the given file and tries to delete it afterwards.postVisitDirectory(Path dir, IOException exc) visitFile(Path file, BasicFileAttributes attrs) visitFileFailed(Path file, IOException exc) Methods inherited from class java.nio.file.SimpleFileVisitor
preVisitDirectory
-
Field Details
-
INSTANCE
-
-
Method Details
-
visitFileFailed
- Specified by:
visitFileFailedin interfaceFileVisitor<Path>- Overrides:
visitFileFailedin classSimpleFileVisitor<Path>- Throws:
IOException
-
visitFile
- Specified by:
visitFilein interfaceFileVisitor<Path>- Overrides:
visitFilein classSimpleFileVisitor<Path>- Throws:
IOException
-
postVisitDirectory
- Specified by:
postVisitDirectoryin interfaceFileVisitor<Path>- Overrides:
postVisitDirectoryin classSimpleFileVisitor<Path>- Throws:
IOException
-
forceDeleteIfExists
Tries to remove any write protection of the given file and tries to delete it afterwards.- Parameters:
path- Path ot a single file or directory. Will not be deleted recursively.- Throws:
IOException- exception thrown by delete. Any exceptions during removal of write protection will be ignored.
-