Struct sel4_async_block_io_fat::fat::OnDiskDirEntry

source ·
pub struct OnDiskDirEntry<'a> { /* private fields */ }
Expand description

Represents a 32-byte directory entry as stored on-disk in a directory file.

Implementations§

source§

impl<'a> OnDiskDirEntry<'a>

Represents the 32 byte directory entry. This is the same for FAT16 and FAT32 (except FAT16 doesn’t use first_cluster_hi).

source

pub fn raw_attr(&self) -> u8

Get the value from the $name field

source

pub fn create_time(&self) -> u16

Get the value from the $name field

source

pub fn create_date(&self) -> u16

Get the value from the $name field

source

pub fn last_access_data(&self) -> u16

Get the value from the $name field

source

pub fn first_cluster_hi(&self) -> u16

Get the value from the $name field

source

pub fn write_time(&self) -> u16

Get the value from the $name field

source

pub fn write_date(&self) -> u16

Get the value from the $name field

source

pub fn first_cluster_lo(&self) -> u16

Get the value from the $name field

source

pub fn file_size(&self) -> u32

Get the $name field

source

pub fn new(data: &[u8]) -> OnDiskDirEntry<'_>

Create a new on-disk directory entry from a block of 32 bytes read from a directory file.

source

pub fn is_end(&self) -> bool

Is this the last entry in the directory?

source

pub fn is_valid(&self) -> bool

Is this a valid entry?

source

pub fn is_lfn(&self) -> bool

Is this a Long Filename entry?

source

pub fn lfn_contents(&self) -> Option<LfnEntry>

If this is an LFN, get the contents so we can re-assemble the filename.

source

pub fn matches(&self, sfn: &ShortFileName) -> bool

Does this on-disk entry match the given filename?

source

pub fn first_cluster_fat32(&self) -> ClusterId

Which cluster, if any, does this file start at? Assumes this is from a FAT32 volume.

source

pub fn get_entry( &self, fat_type: FatType, entry_block: BlockIdx, entry_offset: u32, ) -> DirEntry

Convert the on-disk format into a DirEntry

Trait Implementations§

source§

impl<'a> Debug for OnDiskDirEntry<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for OnDiskDirEntry<'a>

§

impl<'a> RefUnwindSafe for OnDiskDirEntry<'a>

§

impl<'a> Send for OnDiskDirEntry<'a>

§

impl<'a> Sync for OnDiskDirEntry<'a>

§

impl<'a> Unpin for OnDiskDirEntry<'a>

§

impl<'a> UnwindSafe for OnDiskDirEntry<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.