public class PathListing extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PathListing.FilterMode
Whether to include files which match the filter, or exclude them.
|
static interface |
PathListing.PathModifiedTimeFetcher
Fetches last-modified time from a path.
|
Modifier and Type | Field and Description |
---|---|
static PathListing.PathModifiedTimeFetcher |
GET_PATH_MODIFIED_TIME
Uses
Files.getLastModifiedTime() to get the last modified time for a Path. |
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableSortedSet<Path> |
listMatchingPaths(Path pathToGlob,
String globPattern,
PathListing.PathModifiedTimeFetcher pathModifiedTimeFetcher)
Lists matching paths in descending modified time order.
|
static com.google.common.collect.ImmutableSortedSet<Path> |
listMatchingPathsWithFilters(Path pathToGlob,
String globPattern,
PathListing.PathModifiedTimeFetcher pathModifiedTimeFetcher,
PathListing.FilterMode filterMode,
OptionalInt maxPathsFilter,
Optional<Long> totalSizeFilter)
Lists paths in descending modified time order, excluding any paths which bring the number of
files over
maxNumPaths or over totalSizeFilter bytes in size. |
public static final PathListing.PathModifiedTimeFetcher GET_PATH_MODIFIED_TIME
Files.getLastModifiedTime()
to get the last modified time for a Path.public static com.google.common.collect.ImmutableSortedSet<Path> listMatchingPaths(Path pathToGlob, String globPattern, PathListing.PathModifiedTimeFetcher pathModifiedTimeFetcher) throws IOException
IOException
public static com.google.common.collect.ImmutableSortedSet<Path> listMatchingPathsWithFilters(Path pathToGlob, String globPattern, PathListing.PathModifiedTimeFetcher pathModifiedTimeFetcher, PathListing.FilterMode filterMode, OptionalInt maxPathsFilter, Optional<Long> totalSizeFilter) throws IOException
maxNumPaths
or over totalSizeFilter
bytes in size.IOException