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.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.
|
Set<InputStream> |
getResourcesAsStream(String path)
Return an InputStream for each resource mapped by the given path.
|
Set<String> |
list(String relativeTo,
String path,
boolean includeFiles,
boolean includeDirectories,
boolean recursive)
Returns the path to all resources contained in the given root.
|
toClassLoader, toString
addRootPath, convertToPath, convertToPath, getContents, getRootPaths, init, isCaseSensitive
public CommandLineResourceAccessor(ClassLoader loader)
public Set<InputStream> getResourcesAsStream(String path) throws IOException
ResourceAccessor
getResourcesAsStream
in interface ResourceAccessor
getResourcesAsStream
in class ClassLoaderResourceAccessor
IOException
- if there is an error reading an existing path.public Set<String> list(String relativeTo, String path, boolean includeFiles, boolean includeDirectories, boolean recursive) throws IOException
ResourceAccessor
list
in interface ResourceAccessor
list
in class ClassLoaderResourceAccessor
includeFiles
- Set to false to exclude files in the returned set. Defaults to trueincludeDirectories
- Set to false to exclude directories in the returned set. Defaults to truerecursive
- Set to true and will return paths to contents in sub directories as well. Defaults to falseIOException
- if there is an error reading an existing root.Copyright © 2018 Liquibase.org. All rights reserved.