pub struct OpenOptions { /* private fields */ }Expand description
Options and flags which can be used to configure how a file is opened.
This builder mirrors the usage and options of fs::OpenOptions, and
returns a SplitFile instance.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub fn new() -> OpenOptions
pub fn new() -> OpenOptions
Creates a blank set of options ready for configuartion.
All options are initially set to false.
Sourcepub fn read(&mut self, read: bool) -> &mut OpenOptions
pub fn read(&mut self, read: bool) -> &mut OpenOptions
Sets the option for read access.
This option, when true, will indicate that the file should be
read-able if opened.
Sourcepub fn write(&mut self, write: bool) -> &mut OpenOptions
pub fn write(&mut self, write: bool) -> &mut OpenOptions
Sets the option for write access.
This option, when true, will indicate that the file should be
write-able if opened.
Sourcepub fn append(&mut self, append: bool) -> &mut OpenOptions
pub fn append(&mut self, append: bool) -> &mut OpenOptions
Sets the option for append mode.
This option, when true, means that writes will append to a file instead of overwriting previous contents.
Sourcepub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions
pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions
Sets the option for trncating a previous file. This truncate the first
volume, and delete all additional volume files using fs::remove_file.
Sourcepub fn create(&mut self, create: bool) -> &mut OpenOptions
pub fn create(&mut self, create: bool) -> &mut OpenOptions
Sourcepub fn create_new(&mut self, create_new: bool) -> &mut OpenOptions
pub fn create_new(&mut self, create_new: bool) -> &mut OpenOptions
Sets the option to always create a new file.
This option indicates whether a new file will be created. No file is allowed to exist at the target location, also no (dangling) symlink.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more