Struct tw_pack_lib::PackFile
source · pub struct PackFile { /* private fields */ }
Expand description
This struct represents a parsed PackFile
.
All his members are private. To obtain any data from it you have to use the provided getters.
If you want to make more complex use of the PackFile, like editing PackedFiles, it’s recommended that you use this only
to populate your own PackFile
struct with the info/data you need.
Implementations
sourceimpl PackFile
impl PackFile
sourcepub fn get_version(&self) -> PFHVersion
pub fn get_version(&self) -> PFHVersion
This function returns the PFHVersion
of the provided PackFile.
sourcepub fn get_file_type(&self) -> PFHFileType
pub fn get_file_type(&self) -> PFHFileType
This function returns the PFHFileType
of the provided PackFile.
sourcepub fn get_bitmask(&self) -> PFHFlags
pub fn get_bitmask(&self) -> PFHFlags
This function returns the PFHFlags
of the provided PackFile.
sourcepub fn get_timestamp(&self) -> u32
pub fn get_timestamp(&self) -> u32
This function returns the Timestamp
stored in the header of the provided PackFile, if any.
Keep in mind this Timestamp
is in u32
format. If you want to actually check it, you have to convert it to something readable.
sourcepub fn get_pack_file_index(&self) -> Vec<String>
pub fn get_pack_file_index(&self) -> Vec<String>
This function returns the PackFile Index
some PackFiles have after their header.
It’s a Vec<String>
with values like test1.pack
. The game seems to force PackFiles in this Index (if it finds them) to be loaded before the current one.