Function root_relative_path

Source
pub fn root_relative_path(
    root: &Path,
    cwd: &Path,
    path: &Path,
) -> Result<Option<PathBuf>>
Expand description

Given cwd, return path relative to root, or None if path is not under root. This is analagous to pathutil.canonpath() in Python.