pub struct VPKRespawn {
pub header: VPKHeaderRespawn,
pub tree: VPKTree<VPKDirectoryEntryRespawn>,
pub archive_cams: HashMap<u16, VPKRespawnCam>,
}Available on crate feature
revpk only.Expand description
The Respawn VPK format.
Fields§
§header: VPKHeaderRespawnThe VPK’s header.
tree: VPKTree<VPKDirectoryEntryRespawn>The tree of files in the VPK.
archive_cams: HashMap<u16, VPKRespawnCam>The parsed CAM files for this VPK (external files, not included int dir.vpk file)
Implementations§
Trait Implementations§
Source§impl PakReader for VPKRespawn
impl PakReader for VPKRespawn
Source§fn from_file(file: &mut File) -> Result<Self, String>
fn from_file(file: &mut File) -> Result<Self, String>
Create a readable VPK from a directory file.
Source§fn read_file(
&self,
archive_path: &String,
vpk_name: &String,
file_path: &String,
) -> Option<Vec<u8>>
fn read_file( &self, archive_path: &String, vpk_name: &String, file_path: &String, ) -> Option<Vec<u8>>
Read the contents of a file stored in the VPK into memory.
Source§fn extract_file(
&self,
archive_path: &String,
vpk_name: &String,
file_path: &String,
output_path: &String,
) -> Result<(), String>
fn extract_file( &self, archive_path: &String, vpk_name: &String, file_path: &String, output_path: &String, ) -> Result<(), String>
Extract the contents of a file stored in the VPK to a file system location.
Source§fn extract_file_mem_map(
&self,
archive_path: &String,
archive_mmaps: &HashMap<u16, FileBuffer>,
vpk_name: &String,
file_path: &String,
output_path: &String,
) -> Result<(), String>
fn extract_file_mem_map( &self, archive_path: &String, archive_mmaps: &HashMap<u16, FileBuffer>, vpk_name: &String, file_path: &String, output_path: &String, ) -> Result<(), String>
Available on crate feature
mem-map only.Extract the contents of a file stored in the VPK to a file system location using memory-mapped files.
Memory mapped files for every archive used in the extraction must be provided.
Source§impl PakWriter for VPKRespawn
impl PakWriter for VPKRespawn
Source§impl PartialEq for VPKRespawn
impl PartialEq for VPKRespawn
Source§impl TryFrom<&mut File> for VPKRespawn
impl TryFrom<&mut File> for VPKRespawn
impl Eq for VPKRespawn
impl StructuralPartialEq for VPKRespawn
Auto Trait Implementations§
impl Freeze for VPKRespawn
impl RefUnwindSafe for VPKRespawn
impl Send for VPKRespawn
impl Sync for VPKRespawn
impl Unpin for VPKRespawn
impl UnwindSafe for VPKRespawn
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