pub struct CentralDirectoryEntry { /* private fields */ }Expand description
An entry in the ZIP file’s central directory.
Implementations§
Source§impl CentralDirectoryEntry
impl CentralDirectoryEntry
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 unix_permissions(&self) -> Option<u32>
pub fn unix_permissions(&self) -> Option<u32>
Returns the entry’s integer-based UNIX permissions.
Sourcepub fn file_offset(&self) -> u64
pub fn file_offset(&self) -> u64
Returns the file offset of the entry in the ZIP file.
Sourcepub fn compressed_size(&self) -> u64
pub fn compressed_size(&self) -> u64
Returns the entry’s compressed size.
Sourcepub fn uncompressed_size(&self) -> u64
pub fn uncompressed_size(&self) -> u64
Returns the entry’s uncompressed size.
Auto Trait Implementations§
impl Freeze for CentralDirectoryEntry
impl RefUnwindSafe for CentralDirectoryEntry
impl Send for CentralDirectoryEntry
impl Sync for CentralDirectoryEntry
impl Unpin for CentralDirectoryEntry
impl UnwindSafe for CentralDirectoryEntry
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