Top Description Fields Constructors Methods
liquibase.resource

public Class DirectoryResourceAccessor

extends AbstractPathResourceAccessor
Class Inheritance
Imports
liquibase.Scope, java.io.*, java.nio.file.*

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.

Field Summary

Modifier and TypeField and Description
private final Path

Constructor Summary

AccessConstructor and Description
public
DirectoryResourceAccessor(File directory)

Creates a FileSystemResourceAccessor with the given directory as the root.

public
DirectoryResourceAccessor(Path directory)

Creates a FileSystemResourceAccessor with the given directory as the root.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

protected Resource
protected Path
Inherited from liquibase.resource.AbstractPathResourceAccessor:
describeLocationsgetAllsearchsearchtoString

Field Detail

rootDirectoryback to summary
private final Path rootDirectory

Constructor Detail

DirectoryResourceAccessorback to summary
public DirectoryResourceAccessor(File directory) throws FileNotFoundException

Creates a FileSystemResourceAccessor with the given directory as the root.

DirectoryResourceAccessorback to summary
public DirectoryResourceAccessor(Path directory) throws FileNotFoundException

Creates a FileSystemResourceAccessor with the given directory as the root.

Method Detail

closeback to summary
public void close() throws Exception

Implements java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
Exceptions
Exception:
if this resource cannot be closed
createResourceback to summary
protected Resource createResource(Path file, String pathToAdd)

Implements abstract liquibase.resource.AbstractPathResourceAccessor.createResource.

Annotations
@Override
getRootPathback to summary
protected Path getRootPath()

Implements abstract liquibase.resource.AbstractPathResourceAccessor.getRootPath.

Annotations
@Override