Class DirectoryFileResolver
Object
DirectoryFileResolver
- All Implemented Interfaces:
FileResolver
Resolves file paths against a filesystem directory.
Used when importing from a Git working tree.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether a file exists at the given relative path.Lists all files under a directory path.Resolves a relative path to an input stream.resolveAbsolutePath(String relativePath) Resolves a relative path to an absolute filesystem path.
-
Constructor Details
-
DirectoryFileResolver
-
-
Method Details
-
resolve
Description copied from interface:FileResolverResolves a relative path to an input stream.- Specified by:
resolvein interfaceFileResolver- Parameters:
relativePath- path relative to the content root (e.g. "panels/dashboard/form.xml")- Returns:
- input stream for the file content
- Throws:
IOException- if the file cannot be read or does not exist
-
listFiles
Description copied from interface:FileResolverLists all files under a directory path. Used for library imports where the manifest points to a directory.- Specified by:
listFilesin interfaceFileResolver- Parameters:
directoryPath- relative directory path (e.g. "libraries/tema-corporativo/")- Returns:
- list of relative file paths under the directory
- Throws:
IOException- if the directory cannot be read
-
exists
Description copied from interface:FileResolverChecks whether a file exists at the given relative path.- Specified by:
existsin interfaceFileResolver- Parameters:
relativePath- path relative to the content root- Returns:
- true if the file exists and is readable
-
resolveAbsolutePath
Description copied from interface:FileResolverResolves a relative path to an absolute filesystem path. Used when a tool (e.g. Liquibase) needs direct filesystem access.- Specified by:
resolveAbsolutePathin interfaceFileResolver- Returns:
- the absolute path, or null if this resolver is not filesystem-backed
-