sqlar

Crates.iosqlar
lib.rssqlar
version1.0.0
sourcesrc
created_at2021-04-09 18:48:34.67313
updated_at2022-08-15 20:52:33.620349
descriptionPort of the SQLite Archive Files utility
homepage
repositoryhttps://github.com/badboy/sqlar-rs
max_upload_size
id381419
size41,078
Engine Devs (github:amethyst:engine-devs)

documentation

README

sqlar

Crates.io version docs.rs docs License: MIT

sqlar - a SQLite Archive utility

An "SQLite Archive" is a file container similar to a ZIP archive or Tarball but based on an SQLite database.

See the SQLite Archive Files documentation for all information.

This library allows to list archive contents, extract files from archives or create a new archive. It's main usage is throug the command line utility sqlar.

Installation

The command line utility sqlar can be installed through cargo:

cargo install sqlar

Usage

List the content of an archive

sqlar l path/to/file.sqlar

Extract an archive

sqlar x path/to/file.sqlar path/to/dest/

Create an archive

sqlar c path/to/new-archive.sqlar path/to/source/

Example

The library can also be used progamatically.

List files in an archive

use sqlar::with_each_entry;

with_each_entry("path/to/archive.sqlar", false, |entry| {
   println!("File: {}, file type: {:?}, mode: {}", entry.name, entry.filetype, entry.mode);
   Ok(())
});

Create an archive

use sqlar::create;

create("path/to/new-archive.sqlar", &["path/to/source"]);

Extract all files from an archive

use sqlar::extract;

extract("path/to/archive.sqlar", "path/to/dest");

License

MIT. See LICENSE.

Commit count: 16

cargo fmt