Interface WorkingDirectoryCustomizer
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface WorkingDirectoryCustomizer
A callback interface to customize a working directory.- Since:
- 4.0.0
- Author:
- Dmytro Nosan
- See Also:
addResource(Resource, String)
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static WorkingDirectoryCustomizeraddResource(Resource resource, String path)Copy a resource to a target path within the working directory.voidcustomize(Path workingDirectory, Version version)Customizes the working directory.
-
-
-
Method Detail
-
addResource
static WorkingDirectoryCustomizer addResource(Resource resource, String path)
Copy a resource to a target path within the working directory.- If target file does not exist, it will be created. - If target file exists, it will be replaced.
For example:WorkingDirectoryCustomizer.addResource(new ClassPathResource("cassandra.yaml"), "conf/cassandra.yaml")- Parameters:
path- path (file only) within the working directory (e.g. conf/cassandra.yaml)resource- the resource- Returns:
- a new working directory customizer
-
customize
void customize(Path workingDirectory, Version version) throws IOException
Customizes the working directory.- Parameters:
workingDirectory- a working directoryversion- a version- Throws:
IOException- in the case of any I/O errors
-
-