Library and binaries for the reading, creating, and modification of SquashFS file systems.
Library
Add the following to your Cargo.toml file:
[]
= "0.14.0"
Reading
For reading an image and extracting its details and contents, use
[FilesystemReader::from_reader].
Writing
For creating a modified or new image, use [FilesystemWriter::from_fs_reader].
[FilesystemWriter] can also be created from scratch, without a previous image to base itself
on.
Example
# use File;
# use ;
# use ;
// read
let file = new;
let read_filesystem = from_reader.unwrap;
// convert to writer
let mut write_filesystem = from_fs_reader.unwrap;
// add file with data from slice
let d = default;
let bytes = new;
write_filesystem.push_file;
// add file with data from file
let new_file = open.unwrap;
write_filesystem.push_file;
// replace a existing file
let bytes = new;
write_filesystem
.replace_file
.unwrap;
// write into a new file
let mut output = create.unwrap;
write_filesystem.write.unwrap;