public class CollectionGlob extends CollectionAbstract
CollectionAbstract.DateSorter, CollectionAbstract.MyStreamFilter
auxInfo, 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, setStreamFilter
public CollectionGlob(java.lang.String collectionName, java.lang.String glob, org.slf4j.Logger logger)
public void close()
MCollection
public java.lang.Iterable<MFile> getFilesSorted() throws java.io.IOException
MCollection
java.io.IOException
public CloseableIterator<MFile> getFileIterator() throws java.io.IOException
MCollection
try (CloseableIteratoriter = getFileIterator()) { while (iter.hasNext()) { MFile file = iter.next(); } }
java.io.IOException
public static java.nio.file.DirectoryStream newDirectoryStream(java.nio.file.Path dir, java.lang.String glob) throws java.io.IOException
java.io.IOException