public class CleaningPathVisitor extends CountingPathVisitor
Constructor and Description |
---|
CleaningPathVisitor(Counters.PathCounters pathCounter,
DeleteOption[] deleteOption,
java.lang.String... skip)
Constructs a new visitor that deletes files except for the files and directories explicitly given.
|
CleaningPathVisitor(Counters.PathCounters pathCounter,
java.lang.String... skip)
Constructs a new visitor that deletes files except for the files and directories explicitly given.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.nio.file.FileVisitResult |
preVisitDirectory(java.nio.file.Path dir,
java.nio.file.attribute.BasicFileAttributes attributes) |
java.nio.file.FileVisitResult |
visitFile(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attributes) |
static CountingPathVisitor |
withBigIntegerCounters()
Creates a new instance configured with a BigInteger
Counters.PathCounters . |
static CountingPathVisitor |
withLongCounters()
Creates a new instance configured with a long
Counters.PathCounters . |
getPathCounters, postVisitDirectory, toString
visitFileFailed
public CleaningPathVisitor(Counters.PathCounters pathCounter, DeleteOption[] deleteOption, java.lang.String... skip)
pathCounter
- How to count visits.deleteOption
- How deletion is handled.skip
- The files to skip deleting.public CleaningPathVisitor(Counters.PathCounters pathCounter, java.lang.String... skip)
pathCounter
- How to count visits.skip
- The files to skip deleting.public static CountingPathVisitor withBigIntegerCounters()
Counters.PathCounters
.Counters.PathCounters
.public static CountingPathVisitor withLongCounters()
Counters.PathCounters
.Counters.PathCounters
.public boolean equals(java.lang.Object obj)
equals
in class CountingPathVisitor
public int hashCode()
hashCode
in class CountingPathVisitor
public java.nio.file.FileVisitResult preVisitDirectory(java.nio.file.Path dir, java.nio.file.attribute.BasicFileAttributes attributes) throws java.io.IOException
preVisitDirectory
in interface java.nio.file.FileVisitor<java.nio.file.Path>
preVisitDirectory
in class CountingPathVisitor
java.io.IOException
public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attributes) throws java.io.IOException
visitFile
in interface java.nio.file.FileVisitor<java.nio.file.Path>
visitFile
in class CountingPathVisitor
java.io.IOException
Copyright © 2010 - 2023 Adobe. All Rights Reserved