pub struct FileEntry { /* private fields */ }
Expand description
Metadata about one file stored in a cabinet.
Implementations§
Source§impl FileEntry
impl FileEntry
Sourcepub fn datetime(&self) -> Option<PrimitiveDateTime>
pub fn datetime(&self) -> Option<PrimitiveDateTime>
Returns the datetime for this file. According to the CAB spec, this “is typically considered the ‘last modified’ time in local time, but the actual definition is application-defined.”
Note that this will return None
if the datetime in the cabinet file
was not a valid date/time.
Sourcepub fn uncompressed_size(&self) -> u32
pub fn uncompressed_size(&self) -> u32
Returns the total size of the file when decompressed, in bytes.
Sourcepub fn is_read_only(&self) -> bool
pub fn is_read_only(&self) -> bool
Returns true if this file has the “read-only” attribute set.
Returns true if this file has the “hidden” attribute set.
Sourcepub fn is_archive(&self) -> bool
pub fn is_archive(&self) -> bool
Returns true if this file has the “archive” (modified since last backup) attribute set.
Sourcepub fn is_exec(&self) -> bool
pub fn is_exec(&self) -> bool
Returns true if this file has the “execute after extraction” attribute set.
Sourcepub fn is_name_utf(&self) -> bool
pub fn is_name_utf(&self) -> bool
Returns true if this file has the “name is UTF” attribute set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileEntry
impl RefUnwindSafe for FileEntry
impl Send for FileEntry
impl Sync for FileEntry
impl Unpin for FileEntry
impl UnwindSafe for FileEntry
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