pub struct StoredZipEntry { /* private fields */ }Expand description
An immutable store of data about how a ZIP entry is stored within a specific archive.
Besides storing archive independent information like the size and timestamp it can also be used to query information about how the entry is stored in an archive.
Implementations§
Source§impl StoredZipEntry
impl StoredZipEntry
Sourcepub fn header_offset(&self) -> u64
pub fn header_offset(&self) -> u64
Returns the offset in bytes to where the header of the entry starts.
Sourcepub fn header_size(&self) -> u64
pub fn header_size(&self) -> u64
Returns the combined size in bytes of the header, the filename, and any extra fields.
Note: This uses the extra field length stored in the central directory, which may differ from that stored in the local file header. See specification: https://github.com/Majored/rs-async-zip/blob/main/SPECIFICATION.md#732
Methods from Deref<Target = ZipEntry>§
Sourcepub fn filename(&self) -> &ZipString
pub fn filename(&self) -> &ZipString
Returns the entry’s filename.
§Note
This will return the raw filename stored during ZIP creation. If calling this method on entries retrieved from untrusted ZIP files, the filename should be sanitised before being used as a path to prevent directory traversal attacks.
Sourcepub fn compression(&self) -> Compression
pub fn compression(&self) -> Compression
Returns the entry’s compression method.
Sourcepub fn uncompressed_size(&self) -> u64
pub fn uncompressed_size(&self) -> u64
Returns the entry’s uncompressed size.
Sourcepub fn compressed_size(&self) -> u64
pub fn compressed_size(&self) -> u64
Returns the entry’s compressed size.
Sourcepub fn attribute_compatibility(&self) -> AttributeCompatibility
pub fn attribute_compatibility(&self) -> AttributeCompatibility
Returns the entry’s attribute’s host compatibility.
Sourcepub fn last_modification_date(&self) -> &ZipDateTime
pub fn last_modification_date(&self) -> &ZipDateTime
Returns the entry’s last modification time & date.
Sourcepub fn internal_file_attribute(&self) -> u16
pub fn internal_file_attribute(&self) -> u16
Returns the entry’s internal file attribute.
Sourcepub fn external_file_attribute(&self) -> u32
pub fn external_file_attribute(&self) -> u32
Returns the entry’s external file attribute
Sourcepub fn extra_fields(&self) -> &[ExtraField]
pub fn extra_fields(&self) -> &[ExtraField]
Returns the entry’s extra field data.
Sourcepub fn unix_permissions(&self) -> Option<u16>
pub fn unix_permissions(&self) -> Option<u16>
Returns the entry’s integer-based UNIX permissions.
§Note
This will return None if the attribute host compatibility is not listed as Unix.
Trait Implementations§
Source§impl Clone for StoredZipEntry
impl Clone for StoredZipEntry
Source§fn clone(&self) -> StoredZipEntry
fn clone(&self) -> StoredZipEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more