@jsonjoy.com/fs-print
File system tree printer - print a file system structure as a tree
Last updated 3 months ago by GitHub Actions .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @jsonjoy.com/fs-print 
SYNC missed versions from official npm registry.

@jsonjoy.com/fs-print

File system tree printer - print a file system structure as a tree.

Provides a simple API to print any filesystem implementing the FsSynchronousApi interface as a formatted tree structure, useful for debugging and visualization.

Installation

npm install @jsonjoy.com/fs-print

Usage

import { toTreeSync } from '@jsonjoy.com/fs-print';
import { memfs } from 'memfs';

const { fs } = memfs({
  '/readme.md': '...',
  '/src/index.ts': '...',
  '/src/util.ts': '...',
});

console.log(toTreeSync(fs));

Output:

/
├─ src/
│  ├─ index.ts
│  └─ util.ts
└─ readme.md

Options

You can customize the output with options:

toTreeSync(fs, {
  dir: '/src', // Starting directory (default: '/')
  depth: 2, // Maximum depth to traverse (default: 10)
  separator: '/', // Path separator (default: '/')
  tab: '  ', // Indentation string (default: '')
  sort: true, // Sort entries (default: true)
});

License

Apache-2.0

Current Tags

  • 4.80.1                                ...           latest (15 days ago)

49 Versions

  • 4.80.1                                ...           15 days ago
  • 4.80.0                                ...           2 months ago
  • 4.79.0                                ...           2 months ago
  • 4.78.1                                ...           2 months ago
  • 4.78.0                                ...           2 months ago
  • 4.77.0                                ...           2 months ago
  • 4.76.0                                ...           3 months ago
  • 4.75.0                                ...           3 months ago
  • 4.74.0                                ...           3 months ago
  • 4.73.0                                ...           3 months ago
  • 4.72.2                                ...           3 months ago
  • 4.72.1                                ...           3 months ago
  • 4.72.0                                ...           3 months ago
  • 4.71.1                                ...           3 months ago
  • 4.71.0                                ...           3 months ago
  • 4.70.0                                ...           3 months ago
  • 4.69.1                                ...           3 months ago
  • 4.69.0                                ...           3 months ago
  • 4.68.2                                ...           3 months ago
  • 4.68.1                                ...           4 months ago
  • 4.68.0                                ...           4 months ago
  • 4.67.0                                ...           4 months ago
  • 4.66.1                                ...           4 months ago
  • 4.66.0                                ...           4 months ago
  • 4.65.0                                ...           4 months ago
  • 4.64.0                                ...           5 months ago
  • 4.63.0                                ...           5 months ago
  • 4.62.0                                ...           5 months ago
  • 4.61.0                                ...           5 months ago
  • 4.60.0                                ...           5 months ago
  • 4.59.0                                ...           5 months ago
  • 4.58.0                                ...           5 months ago
  • 4.57.8                                ...           5 months ago
  • 4.57.7                                ...           6 months ago
  • 4.57.6                                ...           6 months ago
  • 4.57.5                                ...           6 months ago
  • 4.57.4                                ...           6 months ago
  • 4.57.3                                ...           6 months ago
  • 4.57.2                                ...           7 months ago
  • 4.57.1                                ...           8 months ago
  • 4.57.0                                ...           8 months ago
  • 4.56.11                                ...           9 months ago
  • 4.56.10                                ...           10 months ago
  • 4.56.9                                ...           10 months ago
  • 4.56.8                                ...           10 months ago
  • 4.56.7                                ...           10 months ago
  • 4.56.4                                ...           10 months ago
  • 4.56.2                                ...           10 months ago
  • 4.56.1                                ...           10 months ago
Downloads
Total 62
Today 0
This Week 1
This Month 61
Last Day 0
Last Week 2
Last Month 1
Dependencies (2)
Dev Dependencies (7)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE