Crates.io | sqlarfs |
lib.rs | sqlarfs |
version | 0.1.0 |
source | src |
created_at | 2024-05-22 11:41:44.001355 |
updated_at | 2024-05-22 11:41:44.001355 |
description | A file archive format and virtual filesystem backed by a SQLite database |
homepage | https://github.com/lostatc/sqlarfs-rs |
repository | https://github.com/lostatc/sqlarfs-rs |
max_upload_size | |
id | 1247809 |
size | 282,371 |
A file archive format and virtual filesystem backed by a SQLite database.
This library is a Rust implementation of the sqlar format for SQLite archive files.
This library consists of:
To add this library to your project:
cargo add sqlarfs
See the API docs for documentation and examples.
To install the CLI tool, install Rust and run:
cargo install sqlarfs-cli
The binary will be installed to ~/.cargo/bin/sqlar
.
Archive directory and extract it to a target directory:
sqlar create ./src
sqlar extract --archive src.sqlar ~/Desktop
Archive two directories and extract them to the current directory:
sqlar create --archive files.sqlar ~/Documents ~/Pictures
sqlar extract --archive files.sqlar
Extract a specific file from an archive:
sqlar extract --archive documents.sqlar --source Documents/report.pdf
Add a file to an existing archive.
sqlar archive --archive documents.sqlar ~/Downloads/report.pdf Documents/report.pdf
List all regular files in an archive:
sqlar list --archive documents.sqlar --type file
List only the immediate children of a specific directory in an archive:
sqlar list --archive documents.sqlar --children Documents/Reports/
Remove a file from an archive:
sqlar remove --archive documents.sqlar Documents/report.pdf
The tool has a shorthand syntax for each command:
sqlar c -a files.sqlar ~/Documents ~/Pictures
sqlar ex -a files.sqlar
sqlar ls -a files.sqlar
sqlar rm -a files.sqlar Documents