[][src]Function async_std::fs::symlink_metadata

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

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:

  • path does not point to an existing file or directory.
  • The current process lacks permissions to read metadata for the path.
  • Some other I/O error occurred.

Examples

use async_std::fs;

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