pub struct StoreLayout { /* private fields */ }Expand description
Store directory layout for a project.
Implementations§
Source§impl StoreLayout
impl StoreLayout
pub fn new(project_id: &str) -> Self
pub fn from_home_dir<P: AsRef<Path>>(home_dir: P, project_id: &str) -> Self
pub fn base_dir(&self) -> &Path
pub fn snapshots_dir(&self) -> PathBuf
pub fn catalog_path(&self) -> PathBuf
pub fn trees_dir(&self) -> PathBuf
pub fn packs_dir(&self) -> PathBuf
pub fn index_path(&self) -> PathBuf
pub fn locks_dir(&self) -> PathBuf
pub fn attachments_deps_dir(&self) -> PathBuf
pub fn attachments_git_dir(&self) -> PathBuf
Sourcepub fn tree_path(&self, hash_hex: &str) -> PathBuf
pub fn tree_path(&self, hash_hex: &str) -> PathBuf
Tree path with 2-char prefix: trees/a3/rest_of_hash
Sourcepub fn ensure_dirs(&self) -> Result<()>
pub fn ensure_dirs(&self) -> Result<()>
Create all required directories.
Auto Trait Implementations§
impl Freeze for StoreLayout
impl RefUnwindSafe for StoreLayout
impl Send for StoreLayout
impl Sync for StoreLayout
impl Unpin for StoreLayout
impl UnsafeUnpin for StoreLayout
impl UnwindSafe for StoreLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more