pub struct Paths { /* private fields */ }Expand description
Home-derived file locations under ~/.purple and ~/.ssh. One place that
knows the on-disk layout; every consumer asks here instead of joining the
home directory itself.
Implementations§
Source§impl Paths
impl Paths
pub fn new(home: impl Into<PathBuf>) -> Self
pub fn home(&self) -> &Path
Sourcepub fn purple_dir(&self) -> PathBuf
pub fn purple_dir(&self) -> PathBuf
~/.purple.
Sourcepub fn preferences(&self) -> PathBuf
pub fn preferences(&self) -> PathBuf
~/.purple/preferences.
Sourcepub fn snippets_dir(&self) -> PathBuf
pub fn snippets_dir(&self) -> PathBuf
~/.purple/snippets.
Sourcepub fn container_cache(&self) -> PathBuf
pub fn container_cache(&self) -> PathBuf
~/.purple/container_cache.jsonl.
Sourcepub fn last_version_check(&self) -> PathBuf
pub fn last_version_check(&self) -> PathBuf
~/.purple/last_version_check.
Sourcepub fn askpass_marker(&self, alias: &str) -> PathBuf
pub fn askpass_marker(&self, alias: &str) -> PathBuf
Askpass retry marker ~/.purple/.askpass_<safe>. The alias is
sanitised (/, \, . become _) to prevent path traversal.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more