Class ChainedFileSource

java.lang.Object
thredds.util.filesource.ChainedFileSource
All Implemented Interfaces:
FileSource

public class ChainedFileSource extends Object implements FileSource
Implements the FileSource interface using a chain of DescendantFileSource objects. This allows a relative path to be given and located in the first DescendantFileSource that contains a matching File.
Since:
4.0
  • Constructor Details

  • Method Details

    • getFile

      public File getFile(String path)
      This implementation requires a relative path. The relative path may not start with "../" or once "normalized" start with "../". Here "normalized" means that "./" and "path/.." segments are removed, e.g., "dir1/../../dir2" once normalized would be "../dir2".
      Specified by:
      getFile in interface FileSource
      Parameters:
      path - the relative path to the desired File.
      Returns:
      the File represented by the given relative path or null if the path is null or the File it represents does not exist.
    • toString

      public String toString()
      Overrides:
      toString in class Object