Mirror of CollapseOS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Virgil Dupras 252d71f1b8 Make tools/emul *BSD-friendly il y a 5 ans
..
.gitignore tools/emul/shell: add filesystem support il y a 5 ans
Makefile tools/cfsunpack: new tool il y a 5 ans
README.md cfspack: add the ability to spit a single file il y a 5 ans
cfspack.c Make tools/emul *BSD-friendly il y a 5 ans
cfsunpack.c tools/cfsunpack: new tool il y a 5 ans

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.

If path is a file, a CFS with a single file will be spit and its name will exclude the directory part of that filename.

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.