Skip to main content

resolve_inside

Function resolve_inside 

Source
pub fn resolve_inside(
    root: impl AsRef<Path>,
    child: impl AsRef<Path>,
) -> Result<PathBuf, PathError>
Expand description

Resolve child under root, ensuring the result stays inside root lexically.

§Security

Lexical containment is not symlink-safe. For security-sensitive uses, combine with filesystem canonicalization of both root and result and re-check containment. See SECURITY.md.

§Filesystem access

No.