dir2

Get all directories within a directory.


License
MIT
Install
npm install dir2@0.2.0

Documentation

dir2 NPM version NPM downloads Build Status

Get all directories within a directory.

Install

$ npm install --save dir2

Usage

const dir2 = require('dir2')

// async
dir2('.')
  .then(dirs => {
    console.log(dirs)
    // => ['.git', 'node_modules']
  })

// sync
dir2.sync('.')

API

dir2(sourceDirectory, [options])

sourceDirectory

Type: string
Required: true

The directory to look into.

options

prefix

Type: Boolean
Default: false

Prefixing source path to returned directory name. Like .git => /source/path/.git.

License

MIT © EGOIST