Expand description
Facilities for reading SquashFS archives.
The most common scenario for using this library is:
- To open a SquashFS file, use [
Archive::new
]. - Call
get
to retrieve aNode
by its path. - Call
data
to get aData
object containing the node’s data.
Node
also provides methods for inspecting metadata, resolving symlinks, and conveniently
converting to file and directory objects.
let archive = Archive::open("archive.sfs")?;
match archive.get("/etc/passwd")? {
None => println!("File not present"),
Some(node) => if let Data::File(file) = node.data()? {
println!("{}", file.to_string()?);
},
}
Structs§
- Archive
- An open SquashFS archive.
- Dir
- A directory in the archive.
- File
- A file in the archive.
- Node
- Information about a single node in the directory tree.
- Owned
Dir - An object packaging a
Dir
with theNode
from which it was constructed. - Owned
File - An object packaging a
File
with theNode
from which it was constructed.