#![allow(clippy::option_if_let_else)]
use std::path::{Path, PathBuf};
#[derive(Debug, Clone, getset::Getters)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct Directories {
#[getset(get = "pub")]
root: PathBuf,
#[getset(get = "pub")]
cache: PathBuf,
#[getset(get = "pub")]
staging: PathBuf,
}
impl Directories {
pub(crate) fn new(root: &Path) -> Self {
Self {
root: root.to_path_buf(),
cache: root.join(crate::directory::CACHE),
staging: root.join(crate::directory::STAGING),
}
}
}