DirBuilderExt in std::os::unix::fs - Rust (original) (raw)
Trait DirBuilderExt
1.6.0 · Source
pub trait DirBuilderExt {
// Required method
fn mode(&mut self, mode: u32) -> &mut Self;
}
Available on Unix only.
Expand description
1.6.0 · Source
Sets the mode to create new directories with. This option defaults to 0o777.
§Examples
use std::fs::DirBuilder;
use std::os::unix::fs::DirBuilderExt;
let mut builder = DirBuilder::new();
builder.mode(0o755);
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.