[][src]Function fungus::sys::set_cwd

pub fn set_cwd<P: AsRef<Path>>(path: P) -> FuResult<()>

Changes the current working directory to the specified path. Provides basic path expansion

Returns an Err if the operation fails.

Examples

use fungus::prelude::*;

sys::set_cwd("~/").unwrap();
println!("current working directory: {:?}", sys::cwd().unwrap());