pub struct ArchiveEntry {Show 17 fields
pub name: String,
pub has_stream: bool,
pub is_directory: bool,
pub is_anti_item: bool,
pub has_creation_date: bool,
pub has_last_modified_date: bool,
pub has_access_date: bool,
pub creation_date: NtTime,
pub last_modified_date: NtTime,
pub access_date: NtTime,
pub has_windows_attributes: bool,
pub windows_attributes: u32,
pub has_crc: bool,
pub crc: u64,
pub compressed_crc: u64,
pub size: u64,
pub compressed_size: u64,
}
Expand description
Represents a single file or directory entry within a 7z archive.
Contains metadata about the entry including name, timestamps, attributes, and size information.
Fields§
§name: String
Name/path of the entry within the archive.
has_stream: bool
Whether this entry has associated data stream.
is_directory: bool
Whether this entry is a directory.
is_anti_item: bool
Whether this is an anti-item (used for deletion in updates).
has_creation_date: bool
Whether creation date is present.
has_last_modified_date: bool
Whether last modified date is present.
has_access_date: bool
Whether access date is present.
creation_date: NtTime
Creation date and time.
last_modified_date: NtTime
Last modified date and time.
access_date: NtTime
Last access date and time.
has_windows_attributes: bool
Whether Windows file attributes are present.
windows_attributes: u32
Windows file attributes.
has_crc: bool
Whether CRC is present.
crc: u64
CRC32 checksum of uncompressed data.
compressed_crc: u64
CRC32 checksum of compressed data.
size: u64
Uncompressed size in bytes.
compressed_size: u64
Compressed size in bytes.
Implementations§
Source§impl ArchiveEntry
impl ArchiveEntry
Sourcepub fn new_file(entry_name: &str) -> Self
pub fn new_file(entry_name: &str) -> Self
Creates a new archive entry representing a file.
§Arguments
entry_name
- The name/path of the file within the archive
Sourcepub fn new_directory(entry_name: &str) -> Self
pub fn new_directory(entry_name: &str) -> Self
Creates a new archive entry representing a directory.
§Arguments
entry_name
- The name/path of the directory within the archive
Sourcepub fn from_path(path: impl AsRef<Path>, entry_name: String) -> Self
pub fn from_path(path: impl AsRef<Path>, entry_name: String) -> Self
Creates a new archive entry from a filesystem path.
Automatically extracts metadata like timestamps and attributes from the filesystem. On Windows, backslashes in the entry name are converted to forward slashes.
§Arguments
path
- The filesystem path to extract metadata fromentry_name
- The name/path to use for this entry within the archive
Sourcepub fn is_directory(&self) -> bool
pub fn is_directory(&self) -> bool
Returns whether this entry is a directory.
Sourcepub fn has_stream(&self) -> bool
pub fn has_stream(&self) -> bool
Returns whether this entry has an associated data stream.
Sourcepub fn creation_date(&self) -> NtTime
pub fn creation_date(&self) -> NtTime
Returns the creation date of this entry.
Sourcepub fn last_modified_date(&self) -> NtTime
pub fn last_modified_date(&self) -> NtTime
Returns the last modified date of this entry.
Sourcepub fn windows_attributes(&self) -> u32
pub fn windows_attributes(&self) -> u32
Returns the Windows file attributes of this entry.
Sourcepub fn access_date(&self) -> NtTime
pub fn access_date(&self) -> NtTime
Returns the last access date of this entry.
Sourcepub fn is_anti_item(&self) -> bool
pub fn is_anti_item(&self) -> bool
Returns whether this entry is an anti-item (used for deletion in updates).
Trait Implementations§
Source§impl Clone for ArchiveEntry
impl Clone for ArchiveEntry
Source§fn clone(&self) -> ArchiveEntry
fn clone(&self) -> ArchiveEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more