Struct std::fs::unix::DirBuilder
Utility for creating directories.
Example
use std::fs::{DirBuilder, Path};
DirBuilder::new()
.recursive(true)
.create(Path::new("/tmp/alumina/a/b/c/d/e/f"))
.unwrap();
Run this example
Methods
impl DirBuilder { ... }
-
fn new() -> DirBuilder
-
fn recursive(self: &mut DirBuilder, recursive: bool) -> &mut DirBuilder
Sets whether to create a recursive directory structure.
-
fn mode(self: &mut DirBuilder, mode: u32) -> &mut DirBuilder
Sets the mode for creation.
-
fn create(self: &DirBuilder, path: Path) -> Result<()>
Create the directory (or directory tree) specified by
path
.