pub struct DirEntry<'a, T: ReadWriteSeek + 'a> { /* private fields */ }
Expand description
A FAT directory entry.
DirEntry
is returned by DirIter
when reading a directory.
Implementations§
source§impl<'a, T: ReadWriteSeek> DirEntry<'a, T>
impl<'a, T: ReadWriteSeek> DirEntry<'a, T>
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 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, T> ⓘ
pub fn to_file(&self) -> File<'a, T> ⓘ
Returns File
struct for this entry.
Panics if this is not a file.
sourcepub fn to_dir(&self) -> Dir<'a, T>
pub fn to_dir(&self) -> Dir<'a, T>
Returns Dir
struct for this entry.
Panics if this is not a directory.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for DirEntry<'a, T>
impl<'a, T> !RefUnwindSafe for DirEntry<'a, T>
impl<'a, T> !Send for DirEntry<'a, T>
impl<'a, T> !Sync for DirEntry<'a, T>
impl<'a, T> Unpin for DirEntry<'a, T>
impl<'a, T> !UnwindSafe for DirEntry<'a, T>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)