pub struct ROFile<'a, S>{ /* private fields */ }Expand description
A read-only file within a FAT filesystem
Note: whether or not your FileSystem is RO or R/W, this won’t update
the ROFile::last_accessed_date()
If you want to avoid this behavior in a R/W filesystem, use RWFile
Methods from Deref<Target = Properties>§
Sourcepub fn attributes(&self) -> &Attributes
pub fn attributes(&self) -> &Attributes
Get the corresponding Attributes to this entry
Sourcepub fn creation_time(&self) -> &Option<PrimitiveDateTime>
pub fn creation_time(&self) -> &Option<PrimitiveDateTime>
Find out when this entry was created (max resolution: 1ms)
Returns an Option containing a PrimitiveDateTime from the time crate,
since that field is specified as optional in the FAT32 specification
Sourcepub fn modification_time(&self) -> &PrimitiveDateTime
pub fn modification_time(&self) -> &PrimitiveDateTime
Find out when this entry was last modified (max resolution: 2 secs)
Returns a PrimitiveDateTime from the time crate
Sourcepub fn last_accessed_date(&self) -> &Option<Date>
pub fn last_accessed_date(&self) -> &Option<Date>
Trait Implementations§
Source§impl<S> Read for ROFile<'_, S>
impl<S> Read for ROFile<'_, S>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf. Read moreAuto Trait Implementations§
impl<'a, S> Freeze for ROFile<'a, S>
impl<'a, S> !RefUnwindSafe for ROFile<'a, S>
impl<'a, S> !Send for ROFile<'a, S>
impl<'a, S> !Sync for ROFile<'a, S>
impl<'a, S> Unpin for ROFile<'a, S>
impl<'a, S> !UnwindSafe for ROFile<'a, S>
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