use std::fs;
pub struct DirBuilder {
std: fs::DirBuilder,
}
impl DirBuilder {
pub fn from_std(std: fs::DirBuilder) -> Self {
Self { std }
}
#[allow(clippy::new_without_default)]
#[inline]
pub fn new() -> Self {
Self {
std: fs::DirBuilder::new(),
}
}
#[inline]
pub fn recursive(&mut self, recursive: bool) -> &mut Self {
self.std.recursive(recursive);
self
}
}
#[cfg(unix)]
impl std::os::unix::fs::DirBuilderExt for DirBuilder {
#[inline]
fn mode(&mut self, mode: u32) -> &mut Self {
self.std.mode(mode);
self
}
}