pub struct Paths { /* private fields */ }Implementations§
Source§impl Paths
impl Paths
Sourcepub fn discover() -> Result<Self>
pub fn discover() -> Result<Self>
Resolve paths from ProjectDirs, honoring the data_dir override once it’s read from
config (see Paths::with_overrides).
pub fn with_overrides(self, data_dir: Option<PathBuf>) -> Self
pub fn config_file(&self) -> PathBuf
pub fn state_file(&self) -> PathBuf
pub fn repos_file(&self) -> PathBuf
pub fn sync_lock_file(&self) -> PathBuf
Sourcepub fn workdir_cache_file(&self) -> PathBuf
pub fn workdir_cache_file(&self) -> PathBuf
The crate::workdir scan cache.
Sourcepub fn repos_dir(&self) -> PathBuf
pub fn repos_dir(&self) -> PathBuf
Root of every tool-managed canonical repo’s directory, keyed by name (its normalized URL).
Sourcepub fn repo_dir(&self, name: &str) -> PathBuf
pub fn repo_dir(&self, name: &str) -> PathBuf
Where a tool-managed canonical clone lives: repos/{name}.
Sourcepub fn workspaces_dir(&self) -> PathBuf
pub fn workspaces_dir(&self) -> PathBuf
Root of every review’s workspace: workspaces/.
Sourcepub fn workspace_dir(&self, slug: &str) -> PathBuf
pub fn workspace_dir(&self, slug: &str) -> PathBuf
Where a specific review’s workspace lives: workspaces/{slug}. slug should be the
review’s full canonical id (ReviewKey::slug, e.g. gh/owner/repo/42) so it can’t collide
with another source’s workspace built from the same canonical repo.
pub fn data_dir(&self) -> &Path
Sourcepub fn ensure_dirs(&self) -> Result<()>
pub fn ensure_dirs(&self) -> Result<()>
Create the data and config directories if they don’t exist yet.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Paths
impl RefUnwindSafe for Paths
impl Send for Paths
impl Sync for Paths
impl Unpin for Paths
impl UnsafeUnpin for Paths
impl UnwindSafe for Paths
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