Skip to main content

FatDir

Struct FatDir 

Source
pub struct FatDir<'a, DATA: Read + Seek> { /* private fields */ }
Expand description

A directory within a mounted FAT filesystem.

Implementations§

Source§

impl<'a, DATA: Read + Seek> FatDir<'a, DATA>

Source

pub fn entries(&self) -> FatDirIter<'a, DATA>

Creates an iterator over this directory’s entries.

Source

pub fn open_entry(&self, entry: &FileEntry) -> Result<FatDir<'a, DATA>>

Open a subdirectory from a file entry.

The entry must be a directory.

Source

pub fn find(&self, name: &str) -> Result<Option<FileEntry>>

Find an entry by name.

When the lfn feature is enabled, this performs a case-sensitive match against long file names first, then falls back to case-insensitive short name matching.

Without the lfn feature, only case-insensitive short name matching is used.

Source

pub fn open_dir(&self, name: &str) -> Result<FatDir<'a, DATA>>

Open a subdirectory by name.

Returns an error if the entry is not found or is not a directory.

Source

pub fn open_file(&self, name: &str) -> Result<FileReader<'a, DATA>>

Open a file for reading by name.

Returns an error if the entry is not found or is a directory.

Auto Trait Implementations§

§

impl<'a, DATA> !RefUnwindSafe for FatDir<'a, DATA>

§

impl<'a, DATA> !Send for FatDir<'a, DATA>

§

impl<'a, DATA> !Sync for FatDir<'a, DATA>

§

impl<'a, DATA> !UnwindSafe for FatDir<'a, DATA>

§

impl<'a, DATA> Freeze for FatDir<'a, DATA>

§

impl<'a, DATA> Unpin for FatDir<'a, DATA>

§

impl<'a, DATA> UnsafeUnpin for FatDir<'a, DATA>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybePod for T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.