- Alle implementierten Schnittstellen:
FileVisitor<Path>
A tree of files is deleted.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreate an instance of this class.DeleteVisitor(boolean readOnlyToo) Create an instance of this class. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungpostVisitDirectory(Path dirPath, IOException ioe) Delete a directory after its files have been deleted.visitFile(Path path, BasicFileAttributes attrs) Visit the file and delete it.Von Klasse geerbte Methoden java.nio.file.SimpleFileVisitor
preVisitDirectory, visitFileFailed
-
Konstruktordetails
-
DeleteVisitor
public DeleteVisitor()Create an instance of this class. Read only files will not be deleted. -
DeleteVisitor
public DeleteVisitor(boolean readOnlyToo) Create an instance of this class.- Parameter:
readOnlyToo- if read only files are to be deleted as well
-
-
Methodendetails
-
postVisitDirectory
Delete a directory after its files have been deleted.- Angegeben von:
postVisitDirectoryin SchnittstelleFileVisitor<Path>- Setzt außer Kraft:
postVisitDirectoryin KlasseSimpleFileVisitor<Path>- Parameter:
dirPath- of the directoryioe- IOException that may have been thrown.- Gibt zurück:
- continue processing.
- Löst aus:
IOException
-
visitFile
Visit the file and delete it.- Angegeben von:
visitFilein SchnittstelleFileVisitor<Path>- Setzt außer Kraft:
visitFilein KlasseSimpleFileVisitor<Path>- Parameter:
path- of the file to be deletedattrs- basic file attributes, which are ignored here- Gibt zurück:
- continue processing
- Löst aus:
IOException
-