[][src]Trait mini_fs::Store

pub trait Store {
    type File;
    fn open_path(&self, path: &Path) -> Result<Self::File>;

    fn entries_path(&self, _: &Path) -> Result<Entries> { ... }
}

Generic file storage.

Associated Types

type File

Loading content...

Required methods

fn open_path(&self, path: &Path) -> Result<Self::File>

Loading content...

Provided methods

fn entries_path(&self, _: &Path) -> Result<Entries>

Returns an iterator over the files & directory entries in a given path.

Loading content...

Implementations on Foreign Types

impl<A, B, C, D, E, F, G, H, I, J, K> Store for (A, B, C, D, E, F, G, H, I, J, K) where
    A: Store,
    B: Store,
    C: Store,
    D: Store,
    E: Store,
    F: Store,
    G: Store,
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    A::File: Into<File>,
    B::File: Into<File>,
    C::File: Into<File>,
    D::File: Into<File>,
    E::File: Into<File>,
    F::File: Into<File>,
    G::File: Into<File>,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<B, C, D, E, F, G, H, I, J, K> Store for (B, C, D, E, F, G, H, I, J, K) where
    B: Store,
    C: Store,
    D: Store,
    E: Store,
    F: Store,
    G: Store,
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    B::File: Into<File>,
    C::File: Into<File>,
    D::File: Into<File>,
    E::File: Into<File>,
    F::File: Into<File>,
    G::File: Into<File>,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<C, D, E, F, G, H, I, J, K> Store for (C, D, E, F, G, H, I, J, K) where
    C: Store,
    D: Store,
    E: Store,
    F: Store,
    G: Store,
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    C::File: Into<File>,
    D::File: Into<File>,
    E::File: Into<File>,
    F::File: Into<File>,
    G::File: Into<File>,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<D, E, F, G, H, I, J, K> Store for (D, E, F, G, H, I, J, K) where
    D: Store,
    E: Store,
    F: Store,
    G: Store,
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    D::File: Into<File>,
    E::File: Into<File>,
    F::File: Into<File>,
    G::File: Into<File>,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<E, F, G, H, I, J, K> Store for (E, F, G, H, I, J, K) where
    E: Store,
    F: Store,
    G: Store,
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    E::File: Into<File>,
    F::File: Into<File>,
    G::File: Into<File>,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<F, G, H, I, J, K> Store for (F, G, H, I, J, K) where
    F: Store,
    G: Store,
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    F::File: Into<File>,
    G::File: Into<File>,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<G, H, I, J, K> Store for (G, H, I, J, K) where
    G: Store,
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    G::File: Into<File>,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<H, I, J, K> Store for (H, I, J, K) where
    H: Store,
    I: Store,
    J: Store,
    K: Store,
    H::File: Into<File>,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<I, J, K> Store for (I, J, K) where
    I: Store,
    J: Store,
    K: Store,
    I::File: Into<File>,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<J, K> Store for (J, K) where
    J: Store,
    K: Store,
    J::File: Into<File>,
    K::File: Into<File>, 
[src]

type File = File

impl<S> Store for Vec<S> where
    S: Store
[src]

A vector of stores can be used as an overlay filesystem. Naturally, all the stores will have the same type.

type File = S::File

fn open_path(&self, path: &Path) -> Result<Self::File>[src]

Opens the file identified by path.

fn entries_path(&self, path: &Path) -> Result<Entries>[src]

Returns an iterator over the entries. Skips duplicate entries.

Loading content...

Implementors

impl Store for LocalFs[src]

type File = File

impl Store for MiniFs[src]

type File = File

impl Store for RamFs[src]

type File = RamFile

impl<S: Store> Store for CaselessFs<S>[src]

type File = S::File

fn open_path(&self, path: &Path) -> Result<Self::File>[src]

Opens the file identified by the caseless path. A caseless path that matches the real path of a file always opens that file. Otherwise a caseless path will open the first path of the inner filesystem that matches the caseless path.

fn entries_path(&self, path: &Path) -> Result<Entries>[src]

Iterates over the entries of the inner filesystem.

impl<T: Read + Seek> Store for TarFs<T>[src]

type File = TarFsFile

impl<T: Read + Seek> Store for ZipFs<T>[src]

type File = ZipFsFile

Loading content...