summaryrefslogtreecommitdiffstats
path: root/vendor/tokio/src/fs/symlink_metadata.rs
blob: 1d0df1257605a7f3672ae19cde7e1d2d43e022fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::fs::asyncify;

use std::fs::Metadata;
use std::io;
use std::path::Path;

/// Queries the file system metadata for a path.
///
/// This is an async version of [`std::fs::symlink_metadata`][std]
///
/// [std]: fn@std::fs::symlink_metadata
pub async fn symlink_metadata(path: impl AsRef<Path>) -> io::Result<Metadata> {
    let path = path.as_ref().to_owned();
    asyncify(|| std::fs::symlink_metadata(path)).await
}