Class DirectoryCreationParameters
Object
DirectoryCreationParameters
Options that influence how an output directory is created.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionCreates to not delete directories, and with no consumer called upon directory creation.DirectoryCreationParameters
(boolean deleteExistingDirectory, Optional<Consumer<Path>> callUponDirectoryCreation) Creates a newDirectoryCreationParameters
instance. -
Method Summary
-
Constructor Details
-
DirectoryCreationParameters
public DirectoryCreationParameters()Creates to not delete directories, and with no consumer called upon directory creation. -
DirectoryCreationParameters
public DirectoryCreationParameters(boolean deleteExistingDirectory, Optional<Consumer<Path>> callUponDirectoryCreation) Creates a newDirectoryCreationParameters
instance.- Parameters:
deleteExistingDirectory
- When true, this will delete any existing directory with the same path, and then create it anew.When false, an exception is thrown if an existing directory with the same path already exists.
callUponDirectoryCreation
- When defined, thisconsumer
is called when the directory is first created, as it is created lazily only when first needed.It is called with the path of the directory as an argument.
-
-
Method Details
-
isDeleteExistingDirectory
public boolean isDeleteExistingDirectory()When true, this will delete any existing directory with the same path, and then create it anew.When false, an exception is thrown if an existing directory with the same path already exists.
-
getCallUponDirectoryCreation
When defined, thisconsumer
is called when the directory is first created, as it is created lazily only when first needed.It is called with the path of the directory as an argument.
-
equals
-
hashCode
public int hashCode() -
toString
-