Class CollectionPathMatcher

    • Method Detail

      • close

        public void close()
        Description copied from interface: MCollection
        Close and release any resources. Do not make further calls on this object.
      • getFilesSorted

        public Iterable<MFile> getFilesSorted()
                                       throws IOException
        Description copied from interface: MCollection
        Get the current collection of MFile. if hasDateExtractor() == true, these will be sorted by Date, otherwise by path.
        Returns:
        current collection of MFile as an Iterable.
        Throws:
        IOException
      • getFileIterator

        public CloseableIterator<MFile> getFileIterator()
                                                 throws IOException
        Description copied from interface: MCollection
        Get the current collection of MFile, no guaranteed order. May be faster than getFilesSorted() for large collections, use when order is not important.
         try (CloseableIterator iter = getFileIterator()) {
           while (iter.hasNext()) {
             MFile file = iter.next();
           }
         }
         
        Returns:
        current collection of MFile as an CloseableIterator.
        Throws:
        IOException