pub fn create<T: AsPath + ?Sized>(path: &T) -> FsIOResult<()>
Expand description
Creates the directory (and if needed the parent directories) for the provided path.
Arguments
path
- The directory path
Example
use crate::fsio::directory;
use std::path::Path;
fn main() {
let result = directory::create("./target/__test/directory_test/dir1/dir2");
assert!(result.is_ok());
let path = Path::new("./target/__test/directory_test/dir1/dir2");
assert!(path.exists());
}