[][src]Function rbatis_core::runtime::fs::read_link

pub async fn read_link<P>(path: P) -> Result<PathBuf, Error> where
    P: AsRef<Path>, 

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

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

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

use async_std::fs;

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