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