tato_pipe/lib.rs
1mod atlas_builder;
2mod tileset_builder;
3mod image_builder;
4
5use tileset_builder::*;
6use image_builder::*;
7use tato::*;
8use std::{io, fs, path::Path};
9
10pub use atlas_builder::*;
11
12// extern crate alloc;
13
14/// Deletes all files in a directory, and returns Ok(()) if successful.
15pub fn remove_dir_contents<P: AsRef<Path>>(path: P) -> io::Result<()> {
16 for entry in fs::read_dir(path)? {
17 fs::remove_file(entry?.path())?;
18 }
19 Ok(())
20}