pub struct DirEntry<'a, IO: ReadWriteSeek, TP, OCC> { /* private fields */ }
Expand description
A FAT directory entry.
DirEntry
is returned by DirIter
when reading a directory.
Implementations§
Source§impl<'a, IO: ReadWriteSeek, TP, OCC: OemCpConverter> DirEntry<'a, IO, TP, OCC>
impl<'a, IO: ReadWriteSeek, TP, OCC: OemCpConverter> DirEntry<'a, IO, TP, OCC>
Sourcepub fn short_file_name(&self) -> String
pub fn short_file_name(&self) -> String
Returns short file name.
Non-ASCII characters are replaced by the replacement character (U+FFFD).
Sourcepub fn short_file_name_as_bytes(&self) -> &[u8] ⓘ
pub fn short_file_name_as_bytes(&self) -> &[u8] ⓘ
Returns short file name as byte array slice.
Characters are encoded in the OEM codepage.
Sourcepub fn long_file_name_as_ucs2_units(&self) -> Option<&[u16]>
pub fn long_file_name_as_ucs2_units(&self) -> Option<&[u16]>
Returns long file name as u16 array slice.
Characters are encoded in the UCS-2 encoding.
Sourcepub fn file_name(&self) -> String
pub fn file_name(&self) -> String
Returns long file name or if it doesn’t exist fallbacks to short file name.
Sourcepub fn attributes(&self) -> FileAttributes
pub fn attributes(&self) -> FileAttributes
Returns file attributes.
Sourcepub fn to_file(&self) -> File<'a, IO, TP, OCC> ⓘ
pub fn to_file(&self) -> File<'a, IO, TP, OCC> ⓘ
Returns File
struct for this entry.
Panics if this is not a file.
Sourcepub fn to_dir(&self) -> Dir<'a, IO, TP, OCC>
pub fn to_dir(&self) -> Dir<'a, IO, TP, OCC>
Returns Dir
struct for this entry.
Panics if this is not a directory.
Sourcepub fn created(&self) -> DateTime
pub fn created(&self) -> DateTime
Returns file creation date and time.
Resolution of the time field is 1/100s.
Trait Implementations§
Auto Trait Implementations§
impl<'a, IO, TP, OCC> Freeze for DirEntry<'a, IO, TP, OCC>
impl<'a, IO, TP, OCC> !RefUnwindSafe for DirEntry<'a, IO, TP, OCC>
impl<'a, IO, TP, OCC> !Send for DirEntry<'a, IO, TP, OCC>
impl<'a, IO, TP, OCC> !Sync for DirEntry<'a, IO, TP, OCC>
impl<'a, IO, TP, OCC> Unpin for DirEntry<'a, IO, TP, OCC>
impl<'a, IO, TP, OCC> !UnwindSafe for DirEntry<'a, IO, TP, OCC>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)