Function brane_cli::utils::ensure_data_dir

source ·
pub fn ensure_data_dir(create: bool) -> Result<PathBuf, UtilError>
Expand description

Makes sure that Brane’s data directory exists, and then returns its path.

Arguments

  • create: If true, creates the directory if it does not exist; if false, throws an error.

Returns
A PathBuf with the absolute path that is guaranteed to exist, or an UtilError otherwise.