Unix

Trait Unix 

Source
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§

Source

fn unix_prefixed(&self, parent_path: &Path, prefix: &str) -> FullProjectDirs

Use custom prefix and parent path for the unix-style directories

Source

fn unix_pwd(&self) -> Result<FullProjectDirs, Error>

Get path to the unix-style directories for the current working directory (PWD). Assumes prefix is “.”.

Source

fn unix_home(&self) -> Option<FullProjectDirs>

Get path to the unix-style directories for the current user. Assumes prefix is “.”.

Source

fn unix_binary(&self) -> Result<FullProjectDirs, Error>

Get path to the unix-style directories for the current binary. Assumes prefix is “.”.

Provided Methods§

Source

fn unix(&self, parent_path: &Path) -> FullProjectDirs

Same as unix_prefixed, but assumes prefix is “.”

Implementors§