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