pub struct FileEntry {
pub name: String,
pub size: u64,
pub compressed_size: u64,
pub flags: u32,
pub hashes: Option<(u32, u32)>,
pub table_indices: Option<(usize, Option<usize>)>,
}Expand description
Information about a file in the archive (for listing)
Fields§
§name: StringFile name
size: u64Uncompressed size
compressed_size: u64Compressed size
flags: u32File flags
hashes: Option<(u32, u32)>Hash values (name_1, name_2) - only populated when requested
table_indices: Option<(usize, Option<usize>)>Table indices for direct file access (when name is generic) Contains (hash_index, block_index) for classic tables or (file_index, None) for HET/BET
Implementations§
Source§impl FileEntry
impl FileEntry
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Check if the file is compressed
Sourcepub fn is_encrypted(&self) -> bool
pub fn is_encrypted(&self) -> bool
Check if the file is encrypted
Sourcepub fn has_fix_key(&self) -> bool
pub fn has_fix_key(&self) -> bool
Check if the file uses fixed key encryption
Sourcepub fn is_single_unit(&self) -> bool
pub fn is_single_unit(&self) -> bool
Check if the file is stored as a single unit
Sourcepub fn has_sector_crc(&self) -> bool
pub fn has_sector_crc(&self) -> bool
Check if the file has sector CRCs
Sourcepub fn is_patch_file(&self) -> bool
pub fn is_patch_file(&self) -> bool
Check if the file is a patch file (Cataclysm+ PTCH format)
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more