cap_primitives::fs

Function stat

Source
pub fn stat(
    start: &File,
    path: &Path,
    follow: FollowSymlinks,
) -> Result<Metadata>
Expand description

Perform an fstatat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.