pub struct Paths {
pub stout_dir: PathBuf,
pub prefix: PathBuf,
pub cellar: PathBuf,
}Expand description
Standard paths for stout
Fields§
§stout_dir: PathBufstout config and cache directory (~/.stout)
prefix: PathBufHomebrew prefix (/opt/homebrew or /usr/local)
cellar: PathBufCellar directory
Implementations§
Source§impl Paths
impl Paths
Sourcepub fn config_file(&self) -> PathBuf
pub fn config_file(&self) -> PathBuf
Config file path
Sourcepub fn installed_file(&self) -> PathBuf
pub fn installed_file(&self) -> PathBuf
Installed packages file
Sourcepub fn history_file(&self) -> PathBuf
pub fn history_file(&self) -> PathBuf
Package history file
Sourcepub fn formula_cache(&self) -> PathBuf
pub fn formula_cache(&self) -> PathBuf
Formula cache directory
Sourcepub fn download_cache(&self) -> PathBuf
pub fn download_cache(&self) -> PathBuf
Download cache directory
Sourcepub fn ensure_dirs(&self) -> Result<()>
pub fn ensure_dirs(&self) -> Result<()>
Ensure all directories exist
Sourcepub fn package_path(&self, name: &str, version: &str) -> PathBuf
pub fn package_path(&self, name: &str, version: &str) -> PathBuf
Get the install path for a package
Sourcepub fn is_installed(&self, name: &str, version: &str) -> bool
pub fn is_installed(&self, name: &str, version: &str) -> bool
Check if a package is installed
Sourcepub fn installed_versions(&self, name: &str) -> Vec<String>
pub fn installed_versions(&self, name: &str) -> Vec<String>
List installed versions of a package
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