use super::resolve::default_cache_dir;
use crate::core::NormalizedPath;
#[must_use]
pub fn artifacts_dir() -> NormalizedPath {
artifacts_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn tmp_dir() -> NormalizedPath {
tmp_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn depfile_dir() -> NormalizedPath {
depfile_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn cargo_registry_cache_dir() -> NormalizedPath {
cargo_registry_cache_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn depgraph_dir() -> NormalizedPath {
depgraph_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn symbols_cache_dir() -> NormalizedPath {
symbols_cache_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn symbols_cache_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("symbols")
}
#[must_use]
pub fn cargo_registry_cache_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("cargo-registry")
}
#[must_use]
pub fn index_path() -> NormalizedPath {
index_path_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn crash_dump_dir() -> NormalizedPath {
crash_dump_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn log_dir() -> NormalizedPath {
log_dir_from_cache_dir(&default_cache_dir())
}
#[must_use]
pub fn artifacts_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("artifacts")
}
#[must_use]
pub fn tmp_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("tmp")
}
#[must_use]
pub fn depfile_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
tmp_dir_from_cache_dir(cache_dir).join("depfiles")
}
pub(super) fn depgraph_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("depgraph")
}
#[must_use]
pub fn index_path_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("index.bin")
}
#[must_use]
pub fn metadata_path_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("metadata.bin")
}
#[must_use]
pub fn compiler_hash_cache_path_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("compiler_hash.bin")
}
#[must_use]
pub fn system_includes_cache_path_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("system_includes.bin")
}
pub(super) fn crash_dump_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("crashes")
}
#[must_use]
pub fn log_dir_from_cache_dir(cache_dir: &NormalizedPath) -> NormalizedPath {
cache_dir.join("logs")
}