Class SimpleFileResolver

  • All Implemented Interfaces:
    FileResolver

    public class SimpleFileResolver
    extends Object
    implements FileResolver
    A simple file resolver for resolving local files against a parent directory to get Path objects representing these files
    • Constructor Detail

      • SimpleFileResolver

        public SimpleFileResolver​(Path directory)
    • Method Detail

      • setDirectory

        public void setDirectory​(Path directory)
      • getPaths

        public List<Path> getPaths​(Pattern filepattern)
        Description copied from interface: FileResolver
        Return a list of file-paths matching a given pattern. Empty if there are no matching files.
        Specified by:
        getPaths in interface FileResolver
        Parameters:
        filepattern - String to match.
        Returns:
        The list of matching file-paths.
      • getPath

        public Path getPath​(String filename)
        Description copied from interface: FileResolver
        Return a single path to a given file, or null if the file is not found.
        Specified by:
        getPath in interface FileResolver
        Parameters:
        filename - The filename to resolve.
        Returns:
        Path representing the file.