Struct cap_primitives::fs::OpenOptions [−][src]
pub struct OpenOptions { /* fields omitted */ }
Expand description
Options and flags which can be used to configure how a file is opened.
This corresponds to std::fs::OpenOptions
.
Note that this OpenOptions
has no open
method. To open a file with
an OptionOptions
, you must first obtain a Dir
containing the path, and
then call Dir::open_with
.
Implementations
Creates a blank new set of options ready for configuration.
This corresponds to std::fs::OpenOptions::new
.
Sets the option for read access.
This corresponds to std::fs::OpenOptions::read
.
Sets the option for write access.
This corresponds to std::fs::OpenOptions::write
.
Sets the option for the append mode.
This corresponds to std::fs::OpenOptions::append
.
Sets the option for truncating a previous file.
This corresponds to std::fs::OpenOptions::truncate
.
Sets the option to create a new file.
This corresponds to std::fs::OpenOptions::create
.
Sets the option to always create a new file.
This corresponds to std::fs::OpenOptions::create_new
.
Trait Implementations
To prevent race conditions on Windows, handles for directories must be opened
without FILE_SHARE_DELETE
.
Overrides the dwDesiredAccess
argument to the call to CreateFile
with the specified value. Read more
Sets extra flags for the dwFileFlags
argument to the call to
CreateFile2
to the specified value (or combines it with
attributes
and security_qos_flags
to set the dwFlagsAndAttributes
for CreateFile
). Read more
Sets the dwFileAttributes
argument to the call to CreateFile2
to
the specified value (or combines it with custom_flags
and
security_qos_flags
to set the dwFlagsAndAttributes
for
CreateFile
). Read more
Sets the dwSecurityQosFlags
argument to the call to CreateFile2
to
the specified value (or combines it with custom_flags
and attributes
to set the dwFlagsAndAttributes
for CreateFile
). Read more
Auto Trait Implementations
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnwindSafe for OpenOptions
Blanket Implementations
Mutably borrows from an owned value. Read more