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