Struct dir_meta::FileMetadata
source · 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 moresource§impl<'a> Debug for FileMetadata<'a>
impl<'a> Debug for FileMetadata<'a>
source§impl<'a> Default for FileMetadata<'a>
impl<'a> Default for FileMetadata<'a>
source§fn default() -> FileMetadata<'a>
fn default() -> FileMetadata<'a>
source§impl<'a> PartialEq for FileMetadata<'a>
impl<'a> PartialEq for FileMetadata<'a>
source§fn eq(&self, other: &FileMetadata<'a>) -> bool
fn eq(&self, other: &FileMetadata<'a>) -> bool
self and other values to be equal, and is used
by ==.