Files
tokio/tokio-fs/src/metadata.rs
T
2019-08-04 11:24:30 -07:00

14 lines
282 B
Rust

use crate::asyncify;
use std::fs::Metadata;
use std::io;
use std::path::Path;
/// Queries the file system metadata for a path.
pub async fn metadata<P>(path: P) -> io::Result<Metadata>
where
P: AsRef<Path> + Send + 'static,
{
asyncify(|| std::fs::metadata(&path)).await
}