use std::path::{Path, PathBuf};
#[must_use]
pub fn subnet_catalog_path(cache_root: &Path, network: &str) -> PathBuf {
cache_root
.join("nns")
.join(network)
.join("subnet-catalog")
.join("catalog.json")
}
#[must_use]
pub fn subnet_catalog_refresh_lock_path(cache_root: &Path, network: &str) -> PathBuf {
cache_root
.join("nns")
.join(network)
.join("subnet-catalog")
.join("refresh.lock")
}
#[must_use]
pub fn subnet_catalog_history_path(cache_root: &Path, network: &str) -> PathBuf {
subnet_catalog_path(cache_root, network).with_file_name("history.json")
}
#[must_use]
pub fn subnet_catalog_history_lock_path(cache_root: &Path, network: &str) -> PathBuf {
subnet_catalog_path(cache_root, network).with_file_name("history.lock")
}