pub fn get_parent_directory<T: AsPath + ?Sized>(path: &T) -> Option<String>
Returns the parent path.
path
use fsio::path; use fsio::path::as_path::AsPath; use std::path::Path; fn main() { let dirname = path::get_parent_directory("./src/path/mod.rs"); assert_eq!(dirname.unwrap(), "./src/path"); }