1 | use crate::fs::asyncify; |
---|---|
2 | |
3 | use std::fs::Metadata; |
4 | use std::io; |
5 | use 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 |
12 | pub 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 |