- All Implemented Interfaces:
FileVisitor<Path>
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
forceDeleteIfExists
(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:
visitFileFailed
in interfaceFileVisitor<Path>
- Overrides:
visitFileFailed
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
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
-
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.
-