collapseos/tools/cfspack
Virgil Dupras c317fbdcf9 cfspack: add pattern argument 2019-06-02 16:22:07 -04:00
..
.gitignore tools/emul/shell: add filesystem support 2019-05-12 11:20:31 -04:00
Makefile tools/emul/shell: add filesystem support 2019-05-12 11:20:31 -04:00
README.md cfspack: add pattern argument 2019-06-02 16:22:07 -04:00
cfspack.c cfspack: add pattern argument 2019-06-02 16:22:07 -04:00

README.md

cfspack

A tool/library to pack files into a CFS blob and unpack a CFS blob into a directory.

Usage

To pack a directory into a CFS blob, run:

cfspack /path/to/directory

The blob is spit to stdout. If there are subdirectories, they will be prefixes to the filenames under it.

cfspack takes an optional second argument, a "fnmatch" pattern. If specified, only files patching the pattern will be included.

The program errors out if a file name is too long (> 26 bytes) or too big (> 0x10000 - 0x20 bytes).

To unpack a blob to a directory:

cfsunpack /path/to/dest < blob

If destination exists, files are created alongside existing ones. If a file to unpack already exists, it is overwritten.