directory-stat
Composable directory statistics fetcher where "fs" is insufficient
INSTALLATION
Requirements
- Node.js >= v8.0.0
Instructions
Notice:
- To use directory-stat as a standalone CLI app, you should install the package globally.
- To take advantages of all advanced features like custom statistics collectors, you need to use directory-stat as a library.
npm
With $ npm install directory-stat
or
$ npm install -g directory-stat
yarn
With $ yarn add directory-stat
or
$ yarn global add directory-stat
USAGE
As a Standalone CLI App
Use -h, --help
flag to see more:
$ directory-stat --helpComposable directory statistics fetcher where "fs" is insufficient USAGE $ directory-stat DIR ARGUMENTS DIR directory OPTIONS -d, --depth=depth [default: -1] how deep in directory tree statistics should be fetched. Unlimited
As a Library
Example:
const fs = promises // Node.js >= 10.0.0const path = const StatWriter = const StatCollector = { super'content' } async { if !stat return undefined return fs } const statWriter = path depth: 1 exclude: '.dirstat' 'dirstat.json' output: 'dirstat.json' statCollectors: statWriter
CHANGELOG
Read more here.
TODO
Read more here.