notblib/fs/
delete.rs

1use std::{
2    fs::{remove_dir, remove_dir_all, remove_file},
3    io::Error,
4    path::Path,
5};
6
7pub fn file(path: &Path) -> Result<(), Error> {
8    remove_file(path)?;
9    Ok(())
10}
11
12pub fn dir(path: &Path) -> Result<(), Error> {
13    remove_dir(path)?;
14    Ok(())
15}
16
17pub fn dir_all(path: &Path) -> Result<(), Error> {
18    remove_dir_all(path)?;
19    Ok(())
20}