public class DirectoryPathHandler extends AbstractPathHandler
PathHandler
that converts the path into a DirectoryResourceAccessor
.PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
Constructor and Description |
---|
DirectoryPathHandler() |
Modifier and Type | Method and Description |
---|---|
OutputStream |
createResource(String path)
Creates a new resource at the specified path and returns an OutputStream for writing to it.
|
int |
getPriority(String root)
Returns
Plugin.PRIORITY_DEFAULT for all paths except for ones that are for a non-"file:" protocol. |
Resource |
getResource(String path)
Parse the given "absolute" path and return a
Resource for it if it exists. |
ResourceAccessor |
getResourceAccessor(String root)
Parse the given path and return a
ResourceAccessor for it. |
public int getPriority(String root)
Plugin.PRIORITY_DEFAULT
for all paths except for ones that are for a non-"file:" protocol.public ResourceAccessor getResourceAccessor(String root) throws FileNotFoundException
PathHandler
ResourceAccessor
for it.FileNotFoundException
- if the path is valid but does not existpublic Resource getResource(String path) throws IOException
PathHandler
Resource
for it if it exists.Resource.exists()
to determine if it exists or notIOException
- if the path is invalidpublic OutputStream createResource(String path) throws IOException
PathHandler
FileAlreadyExistsException
- if the file already existsIOException
- if the path cannot be written toCopyright © 2023 Liquibase.org. All rights reserved.