Tarball Tree Printer¶
Prints the directory tree structure of a .tgz (gzipped tarball) archive to the console.
Usage¶
Aliases¶
print-tarball-tree(default)tarball-tree
Options¶
| Option | Description |
|---|---|
-f, --file <path> |
Path to the tarball file |
-h, --help |
Show help message |
Description¶
Reads a .tgz file (gzipped tar archive), extracts the entry names, and prints them as a hierarchical directory tree using Unicode box-drawing characters (├──, └──, │).
The file path can be given as an absolute path or a relative path (resolved against the current working directory).
If no --file argument is provided, the command exits with an error.
If the specified file does not exist, the command exits with an error.
Examples¶
Print the tree of a tarball in the current directory:
Print the tree using an absolute path:
Using the alias:
Source¶
See src/print-tarball-tree.mjs