TarFS
This is a no_std implementation of Tar archive format reader.
This crate's architecture allows to be usable in embedded systems like operating system kernels.
Devices?
This crate uses "devices" as an universal interface to read data.
You can implement Device trait (that also needs no_std_io::io::Read and no_std_io::io::Seek to be implemented) for your structure and use it with tarfs.
See src/file_device.rs for approximate implementation.
Usage
Add this crate by running this command:
cargo add tarfs
Example
Here's a simple example to list all entries in archive:
let fs = from_device;
if fs.is_none
let mut fs = fs.unwrap;
let entries = fs.list.unwrap;
for i in entries
Read text file to string:
let lore: String = fs.read_to_string?;
Read binary file:
let mut data = vec!;
fs.read_file?;
Read API reference on docs.rs.