Class DirectoryTemplateSource
java.lang.Object
network.ike.plugin.scaffold.DirectoryTemplateSource
- All Implemented Interfaces:
TemplateSource
Template source backed by an unpacked directory.
In production the ike-build-standards scaffold is
unpacked to a directory during plugin validate; this class
resolves source paths against that directory.
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryTemplateSource(Path root) Construct a source rooted at the given unpacked scaffold directory. -
Method Summary
-
Constructor Details
-
DirectoryTemplateSource
Construct a source rooted at the given unpacked scaffold directory. Template source paths are resolved as children of this root, with a guard that rejects any path that escapes it.- Parameters:
root- directory containing the scaffold templates
-
-
Method Details
-
read
Description copied from interface:TemplateSourceRead template bytes for a given source path.- Specified by:
readin interfaceTemplateSource- Parameters:
source- the path declared in the manifest'ssourcefield- Returns:
- the template bytes
-