public class CollectionGlob extends CollectionAbstract
CollectionAbstract.DateSorter, CollectionAbstract.MyStreamFilterauxInfo, CATALOG, collectionName, dateExtractor, DIR, FILE, GLOB, lastModified, LIST, logger, protoChoice, root, sfilter, startCollection| Constructor and Description |
|---|
CollectionGlob(String collectionName,
String glob,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close and release any resources.
|
CloseableIterator<MFile> |
getFileIterator()
Get the current collection of MFile, no guaranteed order.
|
Iterable<MFile> |
getFilesSorted()
Get the current collection of MFile.
|
static DirectoryStream |
newDirectoryStream(Path dir,
String glob) |
cleanName, extractDate, getAuxInfo, getCollectionName, getFilenames, getIndexFilename, getLastModified, getLatestFile, getPartitionDate, getProtoIndex, getRoot, hasDateExtractor, makeFileListSorted, open, parseOlderThanString, putAuxInfo, setDateExtractor, setRoot, setStreamFilterpublic void close()
MCollectionpublic Iterable<MFile> getFilesSorted() throws IOException
MCollectionIOExceptionpublic CloseableIterator<MFile> getFileIterator() throws IOException
MCollection
try (CloseableIterator iter = getFileIterator()) {
while (iter.hasNext()) {
MFile file = iter.next();
}
}
IOExceptionpublic static DirectoryStream newDirectoryStream(Path dir, String glob) throws IOException
IOException