pub trait Unix {
// Required methods
fn unix_prefixed(&self, parent_path: &Path, prefix: &str) -> FullProjectDirs;
fn unix_pwd(&self) -> Result<FullProjectDirs, Error>;
fn unix_home(&self) -> Option<FullProjectDirs>;
fn unix_binary(&self) -> Result<FullProjectDirs, Error>;
// Provided method
fn unix(&self, parent_path: &Path) -> FullProjectDirs { ... }
}
Expand description
Retrieve unix-style FullProjectDirs
Required Methods§
Sourcefn unix_prefixed(&self, parent_path: &Path, prefix: &str) -> FullProjectDirs
fn unix_prefixed(&self, parent_path: &Path, prefix: &str) -> FullProjectDirs
Use custom prefix and parent path for the unix-style directories
Sourcefn unix_pwd(&self) -> Result<FullProjectDirs, Error>
fn unix_pwd(&self) -> Result<FullProjectDirs, Error>
Get path to the unix-style directories for the current working directory (PWD). Assumes prefix is “.”.
Sourcefn unix_home(&self) -> Option<FullProjectDirs>
fn unix_home(&self) -> Option<FullProjectDirs>
Get path to the unix-style directories for the current user. Assumes prefix is “.”.
Sourcefn unix_binary(&self) -> Result<FullProjectDirs, Error>
fn unix_binary(&self) -> Result<FullProjectDirs, Error>
Get path to the unix-style directories for the current binary. Assumes prefix is “.”.
Provided Methods§
Sourcefn unix(&self, parent_path: &Path) -> FullProjectDirs
fn unix(&self, parent_path: &Path) -> FullProjectDirs
Same as unix_prefixed, but assumes prefix is “.”