Function path_metadata

Source
fn path_metadata(
    path: impl AsRef<Path>,
    is_symlink: bool,
) -> Result<Metadata, PathValidationError>
Expand description

Returns the Metadata of a std::path::Path.

Uses Path::symlink_metadata if is_symlink is true, else uses Path::metadata to retrieve the Metadata of path.

ยงErrors

Returns a PathValidationError if the metadata of path cannot be retrieved.