1use crate::fs::asyncify;
2
3use std::fs::Metadata;
4use std::io;
5use std::path::Path;
6
7/// Queries the file system metadata for a path.
8///
9/// This is an async version of [`std::fs::symlink_metadata`][std]
10///
11/// [std]: fn@std::fs::symlink_metadata
12pub async fn symlink_metadata(path: impl AsRef<Path>) -> io::Result<Metadata> {
13 let path = path.as_ref().to_owned();
14 asyncify(|| std::fs::symlink_metadata(path)).await
15}
16