[][src]Struct rapture::path::PathManager

pub struct PathManager {}

An empty struct with an impl used for path manipulation

Methods

impl PathManager[src]

pub fn home_dir() -> String[src]

This function returns the users home directory. This is used by most functions in this impl to determine where everything should be installed.

pub fn install_dir() -> String[src]

This function returns the path to the overall install directory: the directory where all the packages will be installed. This is mainly used by make_install_dir to figure out where to put .rapture.

pub fn make_install_dir() -> Result<(), String>[src]

This function creates the install directory for all rapture packages. When rapture starts, it runs this method to verify that the .rapture folder exists so you're able to install packages to that directory.

This function must always be run on startup.

pub fn package_dir(name: String) -> String[src]

This function returns the absolute path to the hypothetical package directory with a given name. This is used by make_package_dir to figure out where to create the package installation directory.

pub fn make_package_dir(name: String) -> Result<(), String>[src]

This function makes the installation directory for a specific package, as opposed to make_install_dir, which creates the directory containing all rapture's installs.

pub fn add_to_path(name: String) -> Result<(), String>[src]

This function adds a path from inside the package installation directory. For example, if i call this function with "one/two/three/four", in a package named wonderful, this will add /home/user/.rapture/wonderful/one/two/three/four to the path. If i call this with /one/two/three/four, however, it will add /one/two/three/four to the path.

This is very experimental on windows. This is not guaranteed to work on windows platforms at all yet. Full support is intended in the future, however.

Auto Trait Implementations

impl Send for PathManager

impl Sync for PathManager

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]