Struct quake_files::pak::PakFile
[−]
[src]
pub struct PakFile { /* fields omitted */ }
A Quake 1 PAK file. Stores a list of directory entries and allows reading single files or extracting the archive to a path.
Methods
impl PakFile
[src]
fn read<P>(path: P) -> QResult<PakFile> where
P: AsRef<Path>,
P: AsRef<Path>,
Reads the .PAK file at the given path. Does not actually read any of the content files, just stores the directory entries.
fn read_file(&mut self, name: &str) -> QResult<Vec<u8>>
Reads the contents of a file with the given name to a Vec<u8>
.
fn extract_to<P>(&mut self, path: P) -> QResult<()> where
P: AsRef<Path>,
P: AsRef<Path>,
Extracts the contents of this PAK file to the given location.