chord-core 0.1.21

async parallel case executor
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::path::Path;

use tokio::fs::metadata;

pub async fn exists(path: impl AsRef<Path>) -> bool {
    metadata(path).await.is_ok()
}

pub async fn is_dir(path: impl AsRef<Path>) -> bool {
    metadata(path).await.map(|m| m.is_dir()).unwrap_or(false)
}