cap_fs_ext

Trait OpenOptionsMaybeDirExt

Source
pub trait OpenOptionsMaybeDirExt {
    // Required method
    fn maybe_dir(&mut self, maybe_dir: bool) -> &mut Self;
}
Expand description

Extension trait for cap_primitives::fs::OpenOptions which adds maybe_dir, a function for controlling whether an open should attempt to succeed on a directory. On Posix-ish platforms, opening a directory always succeeds, but on Windows, opening a directory needs this option.

Required Methods§

Source

fn maybe_dir(&mut self, maybe_dir: bool) -> &mut Self

Sets the option for disabling an error that might be generated by the opened object being a directory.

On some platforms, this may prevent the directory from being deleted or renamed while the handle is open.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§