[−][src]Function async_std::fs::metadata
pub async fn metadata<P: AsRef<Path>>(path: P) -> Result<Metadata>
Queries the metadata for a path.
This function will traverse symbolic links to query information about the file or directory.
This function is an async version of std::fs::metadata
.
Errors
An error will be returned in the following situations (not an exhaustive list):
path
does not exist.- The current process lacks permissions to query metadata for
path
.
Examples
use async_std::fs; let perm = fs::metadata("a.txt").await?.permissions();