Package io.deephaven.configuration
Class DataDir
java.lang.Object
io.deephaven.configuration.DataDir
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Path
get()
Gets the data directory, first by the system property "deephaven.dataDir" if present, next by the system property "workspace" if present, next by the environment variable "DEEPHAVEN_DATA_DIR" if present, and otherwise ".".static Path
Gets the data directory if the system property "deephaven.dataDir" or "workspace" is present, or if the environment variable "DEEPHAVEN_DATA_DIR" is present, otherwise sets the system property "deephaven.dataDir" todefaultValue
and returnsdefaultValue
.
-
Field Details
-
PROPERTY
- See Also:
-
ENV_VAR
- See Also:
-
-
Constructor Details
-
DataDir
public DataDir()
-
-
Method Details
-
get
Gets the data directory, first by the system property "deephaven.dataDir" if present, next by the system property "workspace" if present, next by the environment variable "DEEPHAVEN_DATA_DIR" if present, and otherwise ".".- Returns:
- the data directory
-
getOrSet
Gets the data directory if the system property "deephaven.dataDir" or "workspace" is present, or if the environment variable "DEEPHAVEN_DATA_DIR" is present, otherwise sets the system property "deephaven.dataDir" todefaultValue
and returnsdefaultValue
.- Parameters:
defaultValue
- the value to set if none is present- Returns:
- the data directory
-