Class SortingVisitor
- java.lang.Object
-
- java.nio.file.SimpleFileVisitor<Path>
-
- org.apache.logging.log4j.core.appender.rolling.action.SortingVisitor
-
- All Implemented Interfaces:
FileVisitor<Path>
public class SortingVisitor extends SimpleFileVisitor<Path>
FileVisitor that sorts files.
-
-
Constructor Summary
Constructors Constructor Description SortingVisitor(PathSorter sorter)
Constructs a new DeletingVisitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PathWithAttributes>
getSortedPaths()
FileVisitResult
visitFile(Path path, BasicFileAttributes attrs)
-
Methods inherited from class java.nio.file.SimpleFileVisitor
postVisitDirectory, preVisitDirectory, visitFileFailed
-
-
-
-
Constructor Detail
-
SortingVisitor
public SortingVisitor(PathSorter sorter)
Constructs a new DeletingVisitor.- Parameters:
basePath
- used to relativize pathspathFilters
- objects that need to confirm whether a file can be deleted
-
-
Method Detail
-
visitFile
public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException
- Specified by:
visitFile
in interfaceFileVisitor<Path>
- Overrides:
visitFile
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
getSortedPaths
public List<PathWithAttributes> getSortedPaths()
-
-