public class FileSystemResourceAccessor extends AbstractResourceAccessor
Constructor and Description |
---|
FileSystemResourceAccessor()
Creates with no base directory.
|
FileSystemResourceAccessor(String base)
Creates with base directory for relative path support.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addRootPath(URL path) |
protected String |
convertToPath(String string) |
Set<InputStream> |
getResourcesAsStream(String path)
Return an InputStream for each resource mapped by the given path.
|
protected void |
init() |
Set<String> |
list(String relativeTo,
String path,
boolean includeFiles,
boolean includeDirectories,
boolean recursive)
Returns the path to all resources contained in the given root.
|
ClassLoader |
toClassLoader() |
String |
toString() |
convertToPath, getContents, getRootPaths, isCaseSensitive
public FileSystemResourceAccessor()
public FileSystemResourceAccessor(String base)
protected void init()
init
in class AbstractResourceAccessor
protected void addRootPath(URL path)
addRootPath
in class AbstractResourceAccessor
public Set<InputStream> getResourcesAsStream(String path) throws IOException
ResourceAccessor
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
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.protected String convertToPath(String string)
convertToPath
in class AbstractResourceAccessor
public ClassLoader toClassLoader()
Copyright © 2019 Liquibase.org. All rights reserved.