pub struct Fat32DirectoryEntryInternal {
pub filename: String,
pub short_filename: String,
pub attributes: u8,
pub start_cluster: u32,
pub file_size: u32,
pub creation_time: FileTime,
pub modification_time: FileTime,
pub last_access_date: u16,
}Expand description
Internal data structures for Scarlet’s FAT32 implementation
This module provides high-level, easy-to-use representations of FAT32 data for internal use within the filesystem implementation.
Internal representation of a FAT32 directory entry for Scarlet’s use
This structure combines SFN and LFN information into a single, easy-to-use format. It abstracts away the complexities of the on-disk format while providing all necessary information for filesystem operations.
Fields§
§filename: StringThe primary filename (preferring LFN if available, otherwise SFN)
short_filename: StringShort filename (8.3 format) for compatibility
attributes: u8File attributes
start_cluster: u32Starting cluster number
file_size: u32File size in bytes
creation_time: FileTimeCreation time and date information
modification_time: FileTimeLast modification time and date information
last_access_date: u16Last access date
Implementations§
Source§impl Fat32DirectoryEntryInternal
impl Fat32DirectoryEntryInternal
Sourcepub fn from_raw_entry(raw_entry: &Fat32DirectoryEntry) -> Self
pub fn from_raw_entry(raw_entry: &Fat32DirectoryEntry) -> Self
Create from a raw FAT32 directory entry
Sourcepub fn from_raw(raw_entry: Fat32DirectoryEntry) -> Self
pub fn from_raw(raw_entry: Fat32DirectoryEntry) -> Self
Create from a raw FAT32 directory entry (legacy compatibility)
Sourcepub fn set_long_filename(&mut self, lfn: String)
pub fn set_long_filename(&mut self, lfn: String)
Set the long filename (used when LFN entries are available)
Sourcepub fn is_directory(&self) -> bool
pub fn is_directory(&self) -> bool
Check if this entry represents a directory
Check if this entry is hidden
Sourcepub fn is_read_only(&self) -> bool
pub fn is_read_only(&self) -> bool
Check if this entry is read-only
Sourcepub fn to_raw_entry(&self) -> Fat32DirectoryEntry
pub fn to_raw_entry(&self) -> Fat32DirectoryEntry
Convert to a raw FAT32 directory entry for writing to disk
Trait Implementations§
Source§impl Clone for Fat32DirectoryEntryInternal
impl Clone for Fat32DirectoryEntryInternal
Source§fn clone(&self) -> Fat32DirectoryEntryInternal
fn clone(&self) -> Fat32DirectoryEntryInternal
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Fat32DirectoryEntryInternal
impl RefUnwindSafe for Fat32DirectoryEntryInternal
impl Send for Fat32DirectoryEntryInternal
impl Sync for Fat32DirectoryEntryInternal
impl Unpin for Fat32DirectoryEntryInternal
impl UnwindSafe for Fat32DirectoryEntryInternal
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)