Struct vfs::OpenOptions [] [src]

pub struct OpenOptions {
    // some fields omitted
}

Options for opening files

Methods

impl OpenOptions
[src]

fn new() -> OpenOptions

Create a new instance

fn read(&mut self, read: bool) -> &mut OpenOptions

Open for reading

fn write(&mut self, write: bool) -> &mut OpenOptions

Open for writing

fn create(&mut self, create: bool) -> &mut OpenOptions

Create the file if it does not exist yet

fn append(&mut self, append: bool) -> &mut OpenOptions

Append at the end of the file

fn truncate(&mut self, truncate: bool) -> &mut OpenOptions

Truncate the file to 0 bytes after opening

Trait Implementations

impl Default for OpenOptions
[src]

fn default() -> OpenOptions

Returns the "default value" for a type. Read more

impl Debug for OpenOptions
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.