ClassLoader but for finding and reading files, not finding and loading classes.
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class |
| Modifier and Type | Method and Description |
|---|---|
| public List | |
| public default Resource | |
| public List | |
| public default Resource | getExisting(String path)
Convenience version of |
| public default SortedSet | Returns: empty set if nothing was foundLocation that streamPath should be found relative to. If null, path is an absolute path relativeTo, String The path to lookup resources in. path, boolean Set to true and will return paths to contents in sub directories as well. recursive, boolean Set to true and will return paths to files. includeFiles, boolean Set to true and will return paths to directories. includeDirectories)
Deprecated
use
search(String, boolean)
Returns the path to all resources contained in the given path. |
| public default InputStream | Returns: null if the resource does not existLocation that streamPath should be found relative to. If null, streamPath is an absolute path relativeTo, String streamPath)
Deprecated
Use
search(String, boolean) or getAll(String)
Returns a single stream matching the given path. |
| public default InputStreamList | Returns: Empty list if the resource does not exist.Location that streamPath should be found relative to. If null, streamPath is an absolute path relativeTo, String streamPath)
Deprecated
Use
search(String, boolean) or getAll(String)
Return the streams for each resource mapped by the given path. |
| public default List | Returns: empty set if nothing was foundThe path to lookup resources in. path, ResourceAccessor.A set of criteria for how resources should be found/filtered searchOptionsReturns the path to all resources contained in the given path that match the searchOptions criteria. |
| public List |
| describeLocations | back to summary |
|---|---|
| public List Returns a description of the places this classloader will look for paths. Used in error messages and other troubleshooting cases. | |
| get | back to summary |
|---|---|
| public default Resource get(String path) throws IOException Finds a single specific . If multiple files match the given path, handle based on the
| |
| getAll | back to summary |
|---|---|
| public List Returns all
If the resourceAccessor returns multiple values, the returned List should be considered sorted for that resource accessor.
For example,
| |
| getExisting | back to summary |
|---|---|
| public default Resource getExisting(String path) throws IOException Convenience version of
| |
| list | back to summary |
|---|---|
| public default SortedSet Deprecated Returns the path to all resources contained in the given path.
The passed path is not included in the returned set.
Returned strings should use "/" for file path separators, regardless of the OS and should accept both / and \ chars for file paths to be platform-independent.
Returned set is sorted, normally alphabetically but subclasses can use different comparators.
The values returned should be able to be passed into
Default implementation calls
| |
| openStream | back to summary |
|---|---|
| public default InputStream openStream(String relativeTo, String streamPath) throws IOException
Deprecated Returns a single stream matching the given path. See
| |
| openStreams | back to summary |
|---|---|
| public default InputStreamList openStreams(String relativeTo, String streamPath) throws IOException
Deprecated Return the streams for each resource mapped by the given path.
The path is often a URL but does not have to be.
Should accept both / and \ chars for file paths to be platform-independent.
If path points to a compressed resource, return a stream of the uncompressed contents of the file.
Returns
| |
| search | back to summary |
|---|---|
| public default List Returns the path to all resources contained in the given path that match the searchOptions criteria.
Multiple resources may be returned with the same path, but only if they are actually unique files.
Order is important to pay attention to, they should be returned in a user-expected manner based on this resource accessor.
| |
| search | back to summary |
|---|---|
| public List Returns the path to all resources contained in the given path.
Multiple resources may be returned with the same path, but only if they are actually unique files.
Order is important to pay attention to, they should be returned in a user-expected manner based on this resource accessor.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ResourceAccessor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | isWritable()
Overrides liquibase. Implements liquibase. Return true if the resource can be written to |
| public InputStream | openInputStream()
Implements liquibase. Opens an input stream to read from this resource. |
| public OutputStream | openOutputStream(OpenOptions openOptions)
Overrides liquibase. Implements liquibase. Opens an output stream given the passed |
| public Resource | resolve(String other)
Implements liquibase. Resolve the given path against this resource. |
| public Resource | resolveSibling(String other)
Implements liquibase. Resolves the given path against this resource's parent path. |
| resourceAccessor | back to summary |
|---|---|
| private final ResourceAccessor resourceAccessor | |
| NotFoundResource | back to summary |
|---|---|
| public NotFoundResource(String path, ResourceAccessor resourceAccessor) | |
| exists | back to summary |
|---|---|
| public boolean exists() Implements liquibase.
| |
| isWritable | back to summary |
|---|---|
| public boolean isWritable() Overrides liquibase. Implements liquibase. Doc from liquibase. Return true if the resource can be written to
| |
| openInputStream | back to summary |
|---|---|
| public InputStream openInputStream() throws IOException Implements liquibase. Doc from liquibase. Opens an input stream to read from this resource.
| |
| openOutputStream | back to summary |
|---|---|
| public OutputStream openOutputStream(OpenOptions openOptions) throws IOException Overrides liquibase. Implements liquibase. Doc from liquibase. Opens an output stream given the passed
| |
| resolve | back to summary |
|---|---|
| public Resource resolve(String other) Implements liquibase. Doc from liquibase. Resolve the given path against this resource. If other is an empty path then this method trivially returns this path. Otherwise this method considers this resource to be a directory and resolves the given path against this resource. Even if "other" begins with a `/`, the returned resource should be relative to this resource.
| |
| resolveSibling | back to summary |
|---|---|
| public Resource resolveSibling(String other) Implements liquibase. Doc from liquibase. Resolves the given path against this resource's parent path. This is useful where a file name needs to be replaced with another file name. For example, suppose that the name separator is "/" and a path represents "dir1/dir2/foo", then invoking this method with the Path "bar" will result in the Path "dir1/dir2/bar". If other is an empty path then this method returns this path's parent. Even if "other" begins with a `/`, the returned resource should be relative to this resource.
| |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public String | |
| public int | |
| public int | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void |
| endsWithFilter | back to summary |
|---|---|
| private String endsWithFilter | |
| maxDepth | back to summary |
|---|---|
| private int maxDepth | |
| minDepth | back to summary |
|---|---|
| private int minDepth | |
| SearchOptions | back to summary |
|---|---|
| public SearchOptions() | |
| endsWithFilterIsSet | back to summary |
|---|---|
| public boolean endsWithFilterIsSet() | |
| getEndsWithFilter | back to summary |
|---|---|
| public String getEndsWithFilter() | |
| getMaxDepth | back to summary |
|---|---|
| public int getMaxDepth() | |
| getMinDepth | back to summary |
|---|---|
| public int getMinDepth() | |
| getRecursive | back to summary |
|---|---|
| public boolean getRecursive() | |
| setMaxDepth | back to summary |
|---|---|
| public void setMaxDepth(int maxDepth) | |
| setMinDepth | back to summary |
|---|---|
| public void setMinDepth(int minDepth) | |
| setRecursive | back to summary |
|---|---|
| public void setRecursive(boolean recursive) | |
| setTrimmedEndsWithFilter | back to summary |
|---|---|
| public void setTrimmedEndsWithFilter(String endsWithFilter) | |