pub fn contain_within(
base: &Path,
relative: &Path,
) -> Result<PathBuf, BuildError>Expand description
Resolve relative against base and require the canonicalized result
to stay inside canonicalized base.
ยงErrors
BuildError::Iowhen either canonicalization fails (missing file, permission) or when the resolved path escapesbase(symlink traversal).