Function zng_task::fs::symlink_metadata

pub async fn symlink_metadata<P>(path: P) -> Result<Metadata, Error>
where P: AsRef<Path>,
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.

§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

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