Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233
  1. # cfspack
  2. A tool/library to pack files into a CFS blob and unpack a CFS blob into
  3. a directory.
  4. ## Usage
  5. To pack a directory into a CFS blob, run:
  6. cfspack /path/to/directory
  7. The blob is spit to stdout. If there are subdirectories, they will be prefixes
  8. to the filenames under it.
  9. `cfspack` takes optional -p pattern arguments. If specified, only files
  10. matching at least one of the patterns ("fnmatch" style") will be included.
  11. If path is a file, a CFS with a single file will be spit and its name will
  12. exclude the directory part of that filename.
  13. The chain being spitted is always ended with a "stop block" (a zero-allocation
  14. block that stops the CFS chain). You can call `cfspack` with no argument to get
  15. only a stop block.
  16. The program errors out if a file name is too long (> 26 bytes) or too big
  17. (> 0x10000 - 0x20 bytes).
  18. To unpack a blob to a directory:
  19. cfsunpack /path/to/dest < blob
  20. If destination exists, files are created alongside existing ones. If a file to
  21. unpack already exists, it is overwritten.