pub trait DirBuilderExt { fn mode(&mut self, mode: u32) -> &mut Self; }
Unix-specific extensions to fs::DirBuilder.
fs::DirBuilder
Sets the mode to create new directories with. This option defaults to 0o777.
use std::fs::DirBuilder; use std::os::unix::fs::DirBuilderExt; let mut builder = DirBuilder::new(); builder.mode(0o755);