[][src]Struct mini_fs::caseless::CaselessFs

pub struct CaselessFs<S> { /* fields omitted */ }

Caseless filesystem wrapping an inner filesystem.

Methods

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

pub fn new(inner: S) -> Self[src]

Creates a new caseless filesystem with the provided inner filesystem. It treats paths as case-insensitive, regardless of the case of the inner filesystem.

pub fn into_inner(self) -> S[src]

Moves the inner filesystem out of the caseless filesystem. Inspired by std::io::Cursor.

pub fn get_ref(&self) -> &S[src]

Gets a reference to the inner filesystem. Inspired by std::io::Cursor.

pub fn get_mut(&mut self) -> &mut S[src]

Gets a mutable reference to the inner filesystem. Inspired by std::io::Cursor.

pub fn find<P: AsRef<Path>>(&self, path: P) -> Vec<PathBuf>[src]

Finds paths that match the caseless path. Path components with valid utf8 are compared in a case-insensitive way. Path components with invalid utf8 are compared raw (case-sensitive).

Trait Implementations

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

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

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.

Auto Trait Implementations

impl<S> RefUnwindSafe for CaselessFs<S> where
    S: RefUnwindSafe

impl<S> Send for CaselessFs<S> where
    S: Send

impl<S> Sync for CaselessFs<S> where
    S: Sync

impl<S> Unpin for CaselessFs<S> where
    S: Unpin

impl<S> UnwindSafe for CaselessFs<S> where
    S: UnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.