pub fn canonicalize_safe(path: &Path, root: &Path) -> Result<PathBuf>
Canonicalize path and verify it stays within root. Returns the canonical path or a security error.
path
root