#[repr(C, packed(1))]pub struct Fat32DirectoryEntry {
pub name: [u8; 11],
pub attributes: u8,
pub nt_reserved: u8,
pub creation_time_tenths: u8,
pub creation_time: u16,
pub creation_date: u16,
pub last_access_date: u16,
pub cluster_high: u16,
pub modification_time: u16,
pub modification_date: u16,
pub cluster_low: u16,
pub file_size: u32,
}Expand description
FAT32 Directory Entry structure
This structure represents a single directory entry in a FAT32 directory. Each entry is exactly 32 bytes.
Fields§
§name: [u8; 11]Filename (8.3 format, padded with spaces)
attributes: u8File attributes
nt_reserved: u8Reserved for Windows NT
creation_time_tenths: u8Creation time (tenths of a second)
creation_time: u16Creation time
creation_date: u16Creation date
last_access_date: u16Last access date
cluster_high: u16High 16 bits of cluster number
modification_time: u16Last modification time
modification_date: u16Last modification date
cluster_low: u16Low 16 bits of cluster number
file_size: u32File size in bytes
Implementations§
Source§impl Fat32DirectoryEntry
impl Fat32DirectoryEntry
Sourcepub fn is_long_filename(&self) -> bool
pub fn is_long_filename(&self) -> bool
Check if this is a long filename entry
Sourcepub fn set_cluster(&mut self, cluster: u32)
pub fn set_cluster(&mut self, cluster: u32)
Set the starting cluster number
Sourcepub fn update_cluster_and_size(&mut self, cluster: u32, size: u32)
pub fn update_cluster_and_size(&mut self, cluster: u32, size: u32)
Update only the cluster and file size fields (preserves SFN and other metadata)
Sourcepub fn is_directory(&self) -> bool
pub fn is_directory(&self) -> bool
Check if this is a directory
Sourcepub fn is_volume_label(&self) -> bool
pub fn is_volume_label(&self) -> bool
Check if this is a volume label
Sourcefn parse_filename(name: &[u8; 11]) -> String
fn parse_filename(name: &[u8; 11]) -> String
Parse 8.3 filename format
Sourcepub fn new_directory(name: &str, cluster: u32) -> Self
pub fn new_directory(name: &str, cluster: u32) -> Self
Create a new directory entry for a directory
Sourcefn set_name(&mut self, name: [u8; 11])
fn set_name(&mut self, name: [u8; 11])
Set the filename (8.3 format) - expects properly formatted SFN bytes
Sourcepub fn generate_sfn(name: &str, numeric_tail: u32) -> [u8; 11]
pub fn generate_sfn(name: &str, numeric_tail: u32) -> [u8; 11]
Generate proper 8.3 Short File Name (SFN) from a long filename
Sourcefn is_valid_sfn_char(c: u8) -> bool
fn is_valid_sfn_char(c: u8) -> bool
Check if a character is valid for SFN
Trait Implementations§
Source§impl Clone for Fat32DirectoryEntry
impl Clone for Fat32DirectoryEntry
Source§fn clone(&self) -> Fat32DirectoryEntry
fn clone(&self) -> Fat32DirectoryEntry
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Fat32DirectoryEntry
impl Debug for Fat32DirectoryEntry
impl Copy for Fat32DirectoryEntry
Auto Trait Implementations§
impl Freeze for Fat32DirectoryEntry
impl RefUnwindSafe for Fat32DirectoryEntry
impl Send for Fat32DirectoryEntry
impl Sync for Fat32DirectoryEntry
impl Unpin for Fat32DirectoryEntry
impl UnwindSafe for Fat32DirectoryEntry
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)