Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@karmaniverous/dirtree

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@karmaniverous/dirtree

Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

dirtree

Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.

To install:

npm install @karmaniverous/dirtree

To import:

import { dirtree } from '@karmaniverous/dirtree`;

An Example

PS C:\> dirtree -d src -a size
└─ src
   ├─ cli
   │  └─ index.mjs: 1344
   └─ export
      ├─ dirtree
      │  ├─ dirtree.mjs: 2045
      │  └─ dirtree.test.mjs: 303
      └─ index.mjs: 73

Command Line Interface

Usage: dirtree [options]

Options:
  -a, --attribute <string>  Decorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats
  -n, --depth <int>         Limit the tree to this depth. Default is unlimited.
  -d, --dir <string>        Path to starting directory. Defaults to current working directory.
  -e, --exclude <string>    RegExp pattern to exclude paths from tree.
  -h, --help                display help for command

API Documentation

dirtree([options]) ⇒ string

Extracts an ascii tree representing the file structure under a directory path.

Kind: global function
Returns: string - ASCII tree.

ParamTypeDescription
[options]ObjectOptions object.
[options.attribute]stringDecorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats
[options.debug]booleanLog intermediate steps to console.
[options.depth]numberLimit the tree to this depth. Default is unlimited.
[options.dir]stringPath to starting directory. Defaults to current working directory.
[options.exclude]RegExpRegExp pattern to exclude paths from tree.

See more great templates and other tools on my GitHub Profile!

Keywords

FAQs

Package last updated on 22 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc