use crate::ASSEMBLE_HOME;
use std::ffi::OsStr;
use std::ops::Deref;
use std::path::{Path, PathBuf};
pub struct AssembleCache {
path: PathBuf,
}
impl Default for AssembleCache {
fn default() -> Self {
Self {
path: ASSEMBLE_HOME.path().join("cache"),
}
}
}
impl AsRef<Path> for AssembleCache {
fn as_ref(&self) -> &Path {
self.path.as_path()
}
}
impl AsRef<OsStr> for AssembleCache {
fn as_ref(&self) -> &OsStr {
self.path.as_os_str()
}
}
impl Deref for AssembleCache {
type Target = Path;
fn deref(&self) -> &Self::Target {
self.as_ref()
}
}