pub struct FileMetadata<'a> {
pub size: usize,
pub compressed_size: usize,
pub compression_method: CompressionMethod,
pub crc32: u32,
pub encrypted: bool,
pub path: Cow<'a, Utf8Path>,
pub last_modified: NaiveDateTime,
pub unix_mode: Option<u16>,
/* private fields */
}Expand description
Metadata for a file or directory in the archive, retrieved from its central directory
Fields§
§size: usizeUncompressed size of the file in bytes
compressed_size: usizeCompressed size of the file in bytes
compression_method: CompressionMethodCompression algorithm used to store the file
crc32: u32The CRC-32 of the decompressed file
encrypted: boolTrue if the file is encrypted (decryption is unsupported)
path: Cow<'a, Utf8Path>The provided path of the file.
last_modified: NaiveDateTimeThe ISO 8601 combined date and time the file was last modified
unix_mode: Option<u16>Unix mode bits, if the file was archived in a Unix OS.
This library does not try to convert DOS permission bits into roughly-equivalent Unix mode bits, or do other cross-OS handwaving. Future versions might provide an enum here of different OS’s metadata.
Implementations§
Source§impl<'a> FileMetadata<'a>
impl<'a> FileMetadata<'a>
pub fn into_owned(self) -> FileMetadata<'static>
Trait Implementations§
Source§impl<'a> Debug for FileMetadata<'a>
impl<'a> Debug for FileMetadata<'a>
Source§impl<'a> PartialEq for FileMetadata<'a>
impl<'a> PartialEq for FileMetadata<'a>
impl<'a> Eq for FileMetadata<'a>
impl<'a> StructuralPartialEq for FileMetadata<'a>
Auto Trait Implementations§
impl<'a> Freeze for FileMetadata<'a>
impl<'a> RefUnwindSafe for FileMetadata<'a>
impl<'a> Send for FileMetadata<'a>
impl<'a> Sync for FileMetadata<'a>
impl<'a> Unpin for FileMetadata<'a>
impl<'a> UnwindSafe for FileMetadata<'a>
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