Package org.apache.commons.io.file
Class DeletingPathVisitor
java.lang.Object
java.nio.file.SimpleFileVisitor<Path>
org.apache.commons.io.file.SimplePathVisitor
org.apache.commons.io.file.CountingPathVisitor
org.apache.commons.io.file.DeletingPathVisitor
- All Implemented Interfaces:
- FileVisitor<Path>,- PathVisitor
Deletes files and directories as a visit proceeds.
- Since:
- 2.7
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.commons.io.file.CountingPathVisitorCountingPathVisitor.AbstractBuilder<T,B extends CountingPathVisitor.AbstractBuilder<T, B>>, CountingPathVisitor.Builder 
- 
Constructor SummaryConstructorsConstructorDescriptionDeletingPathVisitor(Counters.PathCounters pathCounter, String... skip) Constructs a instance that deletes files except for the files and directories explicitly given.DeletingPathVisitor(Counters.PathCounters pathCounter, LinkOption[] linkOptions, DeleteOption[] deleteOption, String... skip) Constructs a instance that deletes files except for the files and directories explicitly given.DeletingPathVisitor(Counters.PathCounters pathCounter, DeleteOption[] deleteOption, String... skip) Constructs a instance that deletes files except for the files and directories explicitly given.
- 
Method SummaryModifier and TypeMethodDescriptionbooleaninthashCode()postVisitDirectory(Path dir, IOException exc) preVisitDirectory(Path dir, BasicFileAttributes attrs) visitFile(Path file, BasicFileAttributes attrs) static DeletingPathVisitorConstructs a new instance configured with a BigIntegerCounters.PathCounters.static DeletingPathVisitorConstructs a new instance configured with a longCounters.PathCounters.Methods inherited from class org.apache.commons.io.file.CountingPathVisitoraccept, getPathCounters, toString, updateDirCounter, updateFileCountersMethods inherited from class org.apache.commons.io.file.SimplePathVisitorvisitFileFailed
- 
Constructor Details- 
DeletingPathVisitorpublic DeletingPathVisitor(Counters.PathCounters pathCounter, DeleteOption[] deleteOption, String... skip) Constructs a instance that deletes files except for the files and directories explicitly given.- Parameters:
- pathCounter- How to count visits.
- deleteOption- How deletion is handled.
- skip- The files to skip deleting.
- Since:
- 2.8.0
 
- 
DeletingPathVisitorpublic DeletingPathVisitor(Counters.PathCounters pathCounter, LinkOption[] linkOptions, DeleteOption[] deleteOption, String... skip) Constructs a instance that deletes files except for the files and directories explicitly given.- Parameters:
- pathCounter- How to count visits.
- linkOptions- How symbolic links are handled.
- deleteOption- How deletion is handled.
- skip- The files to skip deleting.
- Since:
- 2.9.0
 
- 
DeletingPathVisitorConstructs a instance that deletes files except for the files and directories explicitly given.- Parameters:
- pathCounter- How to count visits.
- skip- The files to skip deleting.
 
 
- 
- 
Method Details- 
withBigIntegerCountersConstructs a new instance configured with a BigIntegerCounters.PathCounters.- Returns:
- a new instance configured with a BigInteger Counters.PathCounters.
 
- 
withLongCountersConstructs a new instance configured with a longCounters.PathCounters.- Returns:
- a new instance configured with a long Counters.PathCounters.
 
- 
equals- Overrides:
- equalsin class- CountingPathVisitor
 
- 
hashCode- Overrides:
- hashCodein class- CountingPathVisitor
 
- 
postVisitDirectory- Specified by:
- postVisitDirectoryin interface- FileVisitor<Path>
- Overrides:
- postVisitDirectoryin class- CountingPathVisitor
- Throws:
- IOException
 
- 
preVisitDirectory- Specified by:
- preVisitDirectoryin interface- FileVisitor<Path>
- Overrides:
- preVisitDirectoryin class- CountingPathVisitor
- Throws:
- IOException
 
- 
visitFile- Specified by:
- visitFilein interface- FileVisitor<Path>
- Overrides:
- visitFilein class- CountingPathVisitor
- Throws:
- IOException
 
 
-