| Crates.io | fluxcore |
| lib.rs | fluxcore |
| version | 1.0.2 |
| created_at | 2026-01-04 22:07:00.401998+00 |
| updated_at | 2026-01-04 22:51:58.720509+00 |
| description | A rust library that provides similar functionality to GNU-tar |
| homepage | |
| repository | https://github.com/Austin-Bennett/flux |
| max_upload_size | |
| id | 2022605 |
| size | 71,531 |
A library providing similar functionality to tar for rust
cargo install fluxcore
use std::path::PathBuf;
use fluxcore::archive::FolderArchive;
use fluxcore::serialization::FluxFile;
pub fn archive_stuff() -> Option<()> {
let mut my_archive = FolderArchive::new();
my_archive.add(&PathBuf::from("/dir/test.txt")); //must be relative to the CWD
my_archive.add(&PathBuf::from("/to_backup/")); //adds the whole folder recursively
//output to a flux archive
let serialized = FluxFile::serialize(my_archive, true).unwrap();
serialized.save("archive.flux");
...
let mut archive = FluxFile::load("archive.flux").unwrap().deserialize().unwrap();
archive.output_directory(); //loads contents into the CWD
}