Function async_fs::read_link

source ·
pub async fn read_link<P: AsRef<Path>>(path: P) -> Result<PathBuf>
Expand description

Reads a symbolic link and returns the path it points to.

§Errors

An error will be returned in the following situations:

  • path does not point to an existing link.
  • Some other I/O error occurred.

§Examples

let path = async_fs::read_link("a.txt").await?;