Struct gma::GMAFile [−][src]
Expand description
GMA File
Implementations
The author’s steamid. This is currently unused by the game and is usually hardcoded to 0
The description of the addon
The type of the addon
The tags of the item. This should be at most 2 but this implementation supports reading more
Helper function to check if this addon contains a certain tag
The name of the addon’s author
Returns true if the input file was compressed, false otherwise
An iterator of the file entries of this archive
Function to read the contents of a given entry.
The callback function takes as parameter a reference to the entry and a mutable reference to a type that implements Read.
use std::io::Read;
let archive = gma::load_from_memory(&dummy_buffer).unwrap();
for entry in archive.entries() {
let contents = archive.read_entry(entry, |entry_ref, reader|{
let mut c = String::new();
reader.read_to_string(&mut c).unwrap();
c
}).unwrap();
// do something with contents
}