Package thredds.util.filesource
Class ChainedFileSource
java.lang.Object
thredds.util.filesource.ChainedFileSource
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
ChainedFileSource
-
-
Method Details
-
getFile
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:
getFilein interfaceFileSource- 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
-