symlink_metadata in async_std::fs - Rust (original) (raw)

Source

pub async fn symlink_metadata<P: AsRef<Path>>(path: P) -> Result<Metadata>

Expand description

Reads metadata for a path without following symbolic links.

If you want to follow symbolic links before reading metadata of the target file or directory, use metadata instead.

This function is an async version of std::fs::symlink_metadata.

§Errors

An error will be returned in the following situations:

§Examples

use async_std::fs;

let perm = fs::symlink_metadata("a.txt").await?.permissions();