| Crates.io | asar-explorer |
| lib.rs | asar-explorer |
| version | 0.1.0 |
| created_at | 2022-12-04 18:58:45.295178+00 |
| updated_at | 2022-12-04 18:58:45.295178+00 |
| description | A trait that adds capability to unpack electron .asar file(s). |
| homepage | |
| repository | https://github.com/CatUniversity/asar-explorer/ |
| max_upload_size | |
| id | 729703 |
| size | 5,577 |
Trait to unpack an electron .asar file which implements [std::io::Read].
Given an asar file named foo.asar
use std::fs::File;
use asar_explorer::Asar;
fn main() -> std::io::Result<()> {
let mut file = File::open("foo.asar");
let headers = file.get_headers()?;
file.unpack_files(&headers, "./foo", None)?;
Ok(())
}
The above sample will unpack all files into a relative directory called foo.
And that's about it.