3 unstable releases
new 0.2.0 | Nov 15, 2024 |
---|---|
0.1.1 | Nov 10, 2024 |
0.1.0 | Nov 8, 2024 |
#428 in Filesystem
203 downloads per month
Used in squishy-cli
13KB
176 lines
🗜️ Squishy
A convenient wrapper around the backhand library for reading and extracting files from SquashFS filesystems. Provides both a library and CLI tool.
Features
- Read and extract files from SquashFS filesystems
- Traverse filesystem entries
- Handle symlinks with cycle detection
- Search for files using custom predicates
Usage
Add this to your Cargo.toml
:
[dependencies]
squishy = "0.1.0"
Example
use squishy::SquashFS;
use std::path::Path;
// Open a SquashFS file
let squashfs = SquashFS::from_path(&Path::new("example.squashfs"))?;
// List all entries
for entry in squashfs.entries() {
println!("{}", entry.path.display());
}
// Read a specific file
let contents = squashfs.read_file("path/to/file.txt")?;
// Extract a file
squashfs.write_file("source/path.txt", "destination/path.txt")?;
License
This project is licensed under the [MIT] License - see the LICENSE file for details.
Dependencies
~6MB
~118K SLoC