public final class DirectoryCreationParameters extends Object
Constructor and Description |
---|
DirectoryCreationParameters()
Creates to not delete directories, and with no consumer called upon directory
creation.
|
DirectoryCreationParameters(boolean deleteExistingDirectory,
Optional<java.util.function.Consumer<Path>> callUponDirectoryCreation) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Optional<java.util.function.Consumer<Path>> |
getCallUponDirectoryCreation()
When defined, this
consumer is called when the directory is first created, as it is
created lazily only when first needed. |
int |
hashCode() |
boolean |
isDeleteExistingDirectory()
When true, this will delete any existing directory with the same path, and then create it
anew.
|
String |
toString() |
public DirectoryCreationParameters()
public DirectoryCreationParameters(boolean deleteExistingDirectory, Optional<java.util.function.Consumer<Path>> callUponDirectoryCreation)
public boolean isDeleteExistingDirectory()
When false, an exception is thrown if an existing directory with the same path already exists.
public Optional<java.util.function.Consumer<Path>> getCallUponDirectoryCreation()
consumer
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.
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.