pub struct FileMetadata<'a> { /* private fields */ }Expand description
The file metadata like file name, file type, file size, file path etc
Implementations§
Source§impl<'a> FileMetadata<'a>
impl<'a> FileMetadata<'a>
Sourcepub fn formatted_size(&self) -> String
pub fn formatted_size(&self) -> String
Get the size of the file in human readable format
Sourcepub fn accessed(&self) -> Option<Tai64N>
pub fn accessed(&self) -> Option<Tai64N>
Get the TAI64N timestamp when the file was last accessed
Sourcepub fn modified(&self) -> Option<Tai64N>
pub fn modified(&self) -> Option<Tai64N>
Get the TAI64N timestamp when the file was last modified
Sourcepub fn created(&self) -> Option<Tai64N>
pub fn created(&self) -> Option<Tai64N>
Get the TAI64N timestamp when the file was last created
Sourcepub fn accessed_24hr(&self) -> Option<DateTimeString<'a>>
pub fn accessed_24hr(&self) -> Option<DateTimeString<'a>>
Get the timestamp in local time in 24 hour format when the file was last accessed
Sourcepub fn accessed_am_pm(&self) -> Option<DateTimeString<'a>>
pub fn accessed_am_pm(&self) -> Option<DateTimeString<'a>>
Get the timestamp in local time in 12 hour format when the file was last accessed
Sourcepub fn accessed_humatime(&self) -> Option<String>
pub fn accessed_humatime(&self) -> Option<String>
Get the time passed since access of a file eg 3 sec ago
Sourcepub fn modified_24hr(&self) -> Option<DateTimeString<'a>>
pub fn modified_24hr(&self) -> Option<DateTimeString<'a>>
Get the timestamp in local time in 24 hour format when the file was last modified
Sourcepub fn modified_am_pm(&self) -> Option<DateTimeString<'a>>
pub fn modified_am_pm(&self) -> Option<DateTimeString<'a>>
Get the timestamp in local time in 12 hour format when the file was last modified
Sourcepub fn modified_humatime(&self) -> Option<String>
pub fn modified_humatime(&self) -> Option<String>
Get the time passed since modification of a file eg 3 sec ago
Sourcepub fn created_24hr(&self) -> Option<DateTimeString<'a>>
pub fn created_24hr(&self) -> Option<DateTimeString<'a>>
Get the timestamp in local time in 24 hour format when the file was created
Sourcepub fn created_am_pm(&self) -> Option<DateTimeString<'a>>
pub fn created_am_pm(&self) -> Option<DateTimeString<'a>>
Get the timestamp in local time in 12 hour format when the file was created
Sourcepub fn created_humatime(&self) -> Option<String>
pub fn created_humatime(&self) -> Option<String>
Get the time passed since file was created of a file eg 3 sec ago
Sourcepub fn file_format(&self) -> &FileFormat
pub fn file_format(&self) -> &FileFormat
Get the format of the current file
Trait Implementations§
Source§impl<'a> Clone for FileMetadata<'a>
impl<'a> Clone for FileMetadata<'a>
Source§fn clone(&self) -> FileMetadata<'a>
fn clone(&self) -> FileMetadata<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more