Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 502 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 502 Bytes

casclib-rs

Safe CascLib bindings for Rust

use casclib::{open};

let storage = open(r#"C:\Program Files (x86)\StarCraft II\SC2Data"#).unwrap();

// walk all files 
for r in storage.files() { 
  let entry = r.expect("file entry"); 
  let name = entry.get_name(); 
  if name.ends_with(".galaxy") { 
    // found a galaxy file!
  }
}

// extract a file by path
let file = storage.entry(TEST_FILE).open().unwrap();
file.extract(writer).unwrap();