pub struct FatFs<'a, B: BlockDevice> {
block_dev: &'a mut B,
bpb: Bpb,
}Fields§
§block_dev: &'a mut B§bpb: BpbImplementations§
Source§impl<'a, B: BlockDevice> FatFs<'a, B>
impl<'a, B: BlockDevice> FatFs<'a, B>
Sourcefn read_sector_at(
dev: &mut B,
fat32_sector: u32,
buf: &mut [u8; 512],
kernel_block_size: usize,
) -> Option<()>
fn read_sector_at( dev: &mut B, fat32_sector: u32, buf: &mut [u8; 512], kernel_block_size: usize, ) -> Option<()>
Read a FAT32 sector from a block device at any block size.
fn read_sector(&mut self, fat32_sector: u32, buf: &mut [u8; 512]) -> Option<()>
Sourcefn next_cluster(&mut self, cluster: u32) -> Option<u32>
fn next_cluster(&mut self, cluster: u32) -> Option<u32>
Read the next cluster number from the FAT table.
Sourcefn read_chain(
&mut self,
start_cluster: u32,
clusters_to_skip: u32,
max_bytes: Option<usize>,
) -> Option<Vec<u8>>
fn read_chain( &mut self, start_cluster: u32, clusters_to_skip: u32, max_bytes: Option<usize>, ) -> Option<Vec<u8>>
Read a full cluster chain into a heap-allocated buffer.
Skips clusters_to_skip clusters at the start (for offset-based reads).
Only reads max_bytes after the skip, if provided.
Sourcefn read_cluster_chain_alloc(&mut self, cluster: u32) -> Option<Vec<u8>>
fn read_cluster_chain_alloc(&mut self, cluster: u32) -> Option<Vec<u8>>
Read a full cluster chain (from the start, no skip).
Sourcefn read_dir_entries(&mut self, cluster: u32) -> Option<Vec<DirEntry>>
fn read_dir_entries(&mut self, cluster: u32) -> Option<Vec<DirEntry>>
Read raw directory entries from a cluster chain.
Sourcefn parse_dir_entries(&self, data: &[u8]) -> Option<Vec<DirEntry>>
fn parse_dir_entries(&self, data: &[u8]) -> Option<Vec<DirEntry>>
Parse raw directory data into DirEntry items.
Handles:
- End-of-directory marker (0x00)
- Deleted entries (0xE5)
- LFN entries (attr == 0x0F)
- Volume ID entries (attr == 0x08)
Sourcefn resolve_path(&mut self, path: &str) -> Option<DirEntry>
fn resolve_path(&mut self, path: &str) -> Option<DirEntry>
Resolve a path to a directory entry.
Auto Trait Implementations§
impl<'a, B> !UnwindSafe for FatFs<'a, B>
impl<'a, B> Freeze for FatFs<'a, B>
impl<'a, B> RefUnwindSafe for FatFs<'a, B>where
B: RefUnwindSafe,
impl<'a, B> Send for FatFs<'a, B>where
B: Send,
impl<'a, B> Sync for FatFs<'a, B>where
B: Sync,
impl<'a, B> Unpin for FatFs<'a, B>
impl<'a, B> UnsafeUnpin for FatFs<'a, B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more