pub fn relative_path_between<P: AsRef<Path>, Q: AsRef<Path>>(
root: P,
path: Q
) -> Result<RelativePathBuf>
Expand description
Calculates the RelativePathBuf between two Path.
Example
use hua_core::extra::path;
use relative_path::RelativePathBuf;
let root = "/a/b/c/d";
let path = "c/d/e/f";
let relative = path::relative_path_between(root, path)?;
assert_eq!(relative, RelativePathBuf::from("e/f"));