[−][src]Struct splitfile::OpenOptions
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
impl OpenOptions
[src]
pub fn new() -> OpenOptions
[src]
Creates a blank set of options ready for configuartion.
All options are initially set to false
.
pub fn read(&mut self, read: bool) -> &mut OpenOptions
[src]
Sets the option for read access.
This option, when true, will indicate that the file should be
read
-able if opened.
pub fn write(&mut self, write: bool) -> &mut OpenOptions
[src]
Sets the option for write access.
This option, when true, will indicate that the file should be
write
-able if opened.
pub fn append(&mut self, append: bool) -> &mut OpenOptions
[src]
Sets the option for append mode.
This option, when true, means that writes will append to a file instead of overwriting previous contents.
pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions
[src]
Sets the option for trncating a previous file. This truncate the first
volume, and delete all additional volume files using fs::remove_file
.
pub fn create(&mut self, create: bool) -> &mut OpenOptions
[src]
Sets the option for creating a new file.
This option indicates whether a new file will be created if the file does not yet already exist.
In order for the file to be created, write
or append
access must
be used.
pub fn create_new(&mut self, create_new: bool) -> &mut OpenOptions
[src]
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.
pub fn open<P: AsRef<Path>>(&self, path: P, volsize: u64) -> Result<SplitFile>
[src]
Opens a file at path
with the options specified by self
. Path refers
to the path of the first volume. Volsize is the maximum size of each
volume.
Trait Implementations
impl Clone for OpenOptions
[src]
pub fn clone(&self) -> OpenOptions
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for OpenOptions
[src]
impl Default for OpenOptions
[src]
pub fn default() -> OpenOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for OpenOptions
[src]
impl Send for OpenOptions
[src]
impl Sync for OpenOptions
[src]
impl Unpin for OpenOptions
[src]
impl UnwindSafe for OpenOptions
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,