Package liquibase.resource
Class DirectoryResourceAccessor
- java.lang.Object
-
- liquibase.AbstractExtensibleObject
-
- liquibase.resource.AbstractResourceAccessor
-
- liquibase.resource.AbstractPathResourceAccessor
-
- liquibase.resource.DirectoryResourceAccessor
-
- All Implemented Interfaces:
AutoCloseable
,Cloneable
,ExtensibleObject
,ResourceAccessor
public class DirectoryResourceAccessor extends AbstractPathResourceAccessor
A @{link ResourceAccessor} implementation for files on the file system. Will look for files in zip and jar files if they are added as root paths.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface liquibase.resource.ResourceAccessor
ResourceAccessor.NotFoundResource, ResourceAccessor.SearchOptions
-
-
Constructor Summary
Constructors Constructor Description DirectoryResourceAccessor(File directory)
Creates a FileSystemResourceAccessor with the given directory as the root.DirectoryResourceAccessor(Path directory)
Creates a FileSystemResourceAccessor with the given directory as the root.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected Resource
createResource(Path file, String pathToAdd)
protected Path
getRootPath()
-
Methods inherited from class liquibase.resource.AbstractPathResourceAccessor
describeLocations, getAll, search, search, toString
-
Methods inherited from class liquibase.AbstractExtensibleObject
clone, describe, equals, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, hashCode, set
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface liquibase.resource.ResourceAccessor
get, getExisting, list, openStream, openStreams
-
-
-
-
Constructor Detail
-
DirectoryResourceAccessor
public DirectoryResourceAccessor(File directory) throws FileNotFoundException
Creates a FileSystemResourceAccessor with the given directory as the root.- Throws:
FileNotFoundException
-
DirectoryResourceAccessor
public DirectoryResourceAccessor(Path directory) throws FileNotFoundException
Creates a FileSystemResourceAccessor with the given directory as the root.- Throws:
FileNotFoundException
-
-
Method Detail
-
getRootPath
protected Path getRootPath()
- Specified by:
getRootPath
in classAbstractPathResourceAccessor
-
createResource
protected Resource createResource(Path file, String pathToAdd)
- Specified by:
createResource
in classAbstractPathResourceAccessor
-
-