Skip to content

Releases: aprosail/empty_inside_dir

v1.1.0

12 Oct 09:44

Choose a tag to compare

Support multiple types:

The parameter's signature is impl AsRef<Path>,
which means it can accept any type that implements AsRef<Path>,
such as &Path, PathBuf, String, &str, etc.

v1.0.0

12 Oct 09:43

Choose a tag to compare

Implement basic function: Empty the contents of a directory without deleting the directory itself.

use empty_inside_dir::empty_dir;
use std::path::Path;

fn main() -> Result<(), std::io::Error> {
    let path = Path::new("./example_directory");
    empty_dir(path)?;
    Ok(())
}