Class MatchedFiles


  • public class MatchedFiles
    extends Object
    A collection of files that match some specified file pattern.
    Author:
    Nick Collier
    See Also:
    OutputFinder
    • Constructor Detail

    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Gets whether or not this MatchedFiles collection has any files.
        Returns:
        true if this has no files, otherwise false.
      • getPattern

        public OutputPattern getPattern()
        Gets the OutputPattern associated with this MatchedFiles.
        Returns:
      • matches

        public boolean matches​(Path path)
        Gets whether or not the path matches this MatchedFiles pattern.
        Parameters:
        path -
        Returns:
        true if there is a match otherwise false.
      • addFile

        public void addFile​(File file)
        Adds the specified file as a match.
        Parameters:
        file -
      • getFiles

        public List<File> getFiles()
        Gets a List of the matched files.
        Returns:
        a List of the matched files.
      • addAllFiles

        public void addAllFiles​(Collection<File> files)
        Adds all the files as matched files.
        Parameters:
        files -
      • aggregateOutput

        public void aggregateOutput​(String outputDir)
                             throws IOException
        Aggregates all the files into this MatchedFiles output file written to the specified directory.
        Parameters:
        outputDir -
        Throws:
        IOException