Expand description
.s2mod archive packing / unpacking.
.s2mod is a zip archive (or plain directory) containing converted assets and a manifest.toml.
§Example (compile-only, requires real paths at runtime)
ⓘ
use s2mod_packer::{S2ModPackage, ContentPackManifest};
// Pack a directory into a .s2mod zip archive
S2ModPackage::pack_to_zip("my_mod_dir", "output.s2mod").unwrap();
// Open an existing archive
let pack = S2ModPackage::open("pack.s2mod").unwrap();
println!("Pack: {}", pack.manifest().pack.name);
// Unpack an archive
S2ModPackage::unpack_to_dir("pack.s2mod", "output_dir").unwrap();