use super::Fs;
use std::io;
use std::path::Path;
#[derive(Debug, Clone, Copy, Default)]
pub struct StdFs;
impl StdFs {
#[must_use]
pub const fn new() -> Self {
Self
}
}
impl Fs for StdFs {
fn exists(&self, path: &Path) -> bool {
path.exists()
}
fn is_file(&self, path: &Path) -> bool {
path.is_file()
}
fn is_dir(&self, path: &Path) -> bool {
path.is_dir()
}
fn create_dir_all(&self, path: &Path) -> io::Result<()> {
std::fs::create_dir_all(path)
}
}