[][src]Struct splitfile::SplitFile

pub struct SplitFile { /* fields omitted */ }

A reference to an open set of volumes on the filesystem.

An instance of SplitFile can be read and/or written in the same way as a single file is via fs::File, but with data allocated across volumes.

Second and subsequent volumes written use the path and filename of the first volume, and append the extension ".n", where n is the index of each respective volume.

SplitFile implements Read, Write and Seek traits.

Implementations

impl SplitFile[src]

pub fn open<P: AsRef<Path>>(path: P, volsize: u64) -> Result<SplitFile>[src]

Attempts to open a file in read-only mode.

See the OpenOptions::open method for more details.

pub fn create<P: AsRef<Path>>(path: P, volsize: u64) -> Result<SplitFile>[src]

Opens a file in write-only mode.

This function will create a file if it does not exist, and will truncate it if it does.

Trait Implementations

impl Debug for SplitFile[src]

impl Read for SplitFile[src]

impl Seek for SplitFile[src]

impl Write for SplitFile[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.