[][src]Enum matryoshka::DataSource

pub enum DataSource {
    Dir(DataSource),
    Zip(DataSource),
}

Variants

Implementations

impl DataSource[src]

pub fn open<P: AsRef<Path>>(
    &self,
    path: P,
    opts: OpenOptions
) -> Result<ResFile>
[src]

Opens a file at path inside of this DataSource.

pub fn create_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>[src]

Creates a directory at path inside of this DataSource.

pub fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>[src]

Creates a directory including all its parent directories at path inside of this DataSource.

pub fn delete_file<P: AsRef<Path>>(&self, path: P) -> Result<()>[src]

Deletes the file specified by path inside of this DataSource.

pub fn delete_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>[src]

Deletes the directory specified by path inside of this DataSource. This will fail if the directory is not empty.

pub fn delete_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>[src]

Deletes the directory specified by path inside of this DataSource, including all files and directories contained within, recursively.

pub fn list_dir<P: AsRef<Path>>(&self, path: P) -> Result<Vec<DirEntry>>[src]

Returns a list of contents of the directory specified by path.

pub fn read_info<P: AsRef<Path>>(&self, path: P) -> Result<FileInfo>[src]

Returns information about the file or directory specified by path.

pub fn is_file<P: AsRef<Path>>(&self, path: P) -> bool[src]

Returns whether path points to a file.

pub fn is_dir<P: AsRef<Path>>(&self, path: P) -> bool[src]

Returns whether path points to a directory.

Trait Implementations

impl Debug for DataSource[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.