[−][src]Trait path_calculate::calculate::Calculate
Let Path and PathBuf have some path calculate methods.
Required methods
fn home_dir(&self) -> Result<Cow<'_, Path>>[src]
Get current env's home_dir if it exist.
fn as_absolute_path(&self) -> Result<Cow<'_, Path>>[src]
Get the absolute path, even if the path is not exist.
fn relative_root_with(&self, path_b: &Path) -> Result<Cow<'_, Path>>[src]
Get a relative root path betwwen two pathes.
fn related_to(&self, src_path: &Path) -> Result<Cow<'_, Path>>[src]
Get dst_path's relative path from the src_path.