public class CommandLineResourceAccessor extends ClassLoaderResourceAccessor
ClassLoaderResourceAccessor that adds extra fuzzy searching logic based on
what users may enter that is different than what is exactly correct.description, rootPaths| Constructor and Description |
|---|
CommandLineResourceAccessor(ClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
getAlternatePaths(String path)
Return alternate options for the given path that the user maybe meant.
|
SortedSet<String> |
list(String relativeTo,
String path,
boolean includeFiles,
boolean includeDirectories,
boolean recursive)
Returns the path to all resources contained in the given path.
|
InputStreamList |
openStreams(String relativeTo,
String streamPath)
Return the streams for each resource mapped by the given path.
|
describeLocations, getFinalPath, init, isDirectory, listFromClassLoader, listFromRootPaths, loadRootPathsopenStreamclone, describe, equals, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, hashCode, set, toStringpublic CommandLineResourceAccessor(ClassLoader loader)
public InputStreamList openStreams(String relativeTo, String streamPath) throws IOException
ResourceAccessorInputStreamList since multiple resources can map to the same path, such as "META-INF/MAINFEST.MF".
Remember to close streams when finished with them.openStreams in interface ResourceAccessoropenStreams in class ClassLoaderResourceAccessorrelativeTo - Location that streamPath should be found relative to. If null, streamPath is an absolute pathIOException - if there is an error reading an existing path.public SortedSet<String> list(String relativeTo, String path, boolean includeFiles, boolean includeDirectories, boolean recursive) throws IOException
ResourceAccessorResourceAccessor.openStreams(String, String) and return the contents.
Returned paths should normally be root-relative and therefore not be an absolute path, unless there is a good reason to be absolute.list in interface ResourceAccessorlist in class ClassLoaderResourceAccessorrelativeTo - Location that streamPath should be found relative to. If null, path is an absolute pathpath - The path to lookup resources in.includeFiles - Set to true and will return paths to contents in sub directories as well.includeDirectories - Set to true and will return paths to files.recursive - Set to true and will return paths to directories.IOException - if there is an error reading an existing root.Copyright © 2021 Liquibase.org. All rights reserved.