Class FileLocator
java.lang.Object
com.github.rvesse.airline.parser.resources.FileLocator
- All Implemented Interfaces:
ResourceLocator
- Direct Known Subclasses:
AbstractPlaceholderLocator, HomeDirectoryLocator, WorkingDirectoryLocator
A resource locator that does no resolution other than removing any leading
file:// prefix i.e. treats paths as literal files
Derived implementations can override the resolve(String) method to
apply some interpretation of the location to resolve special paths, variable
references etc.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
FILE_URI_PREFIX
- See Also:
-
-
Constructor Details
-
FileLocator
public FileLocator()
-
-
Method Details
-
resolve
-
open
Description copied from interface:ResourceLocatorOpens a search location, potentially applying some resolution rules to that locationIf the given
resourceNameexists in the search location then that resource should be returned. If that is not a valid resource but the search location itself is a valid resource then the locator should return that instead.- Specified by:
openin interfaceResourceLocator- Parameters:
searchLocation- Search locationresourceName- Resource name expected in the search location- Returns:
- Input stream to read the search location or
nullif not a valid location - Throws:
IOException- Thrown if there is a problem accessing the search location
-