dirscanner

0.0.2 • Public • Published

DirScanner

Traverses a given directory and builds a tree from its structure.

Installation

npm install dirscanner

Usage

API

dirscanner(target, ignore, start);

  • target

    The path to scan.

  • ignore

    Optional array of regexp objects. Any basename matching this pattern will not be scanned. Might be expanded to include full paths in the future.

  • start

    Third optional argument, pass false if you don't want the dirscanner to start immediately.

Example

Start scan in target directory.

var dirscanner = require('dirscanner');
var ds = dirscanner('/path/to/directory/to/scan');
ds.on('done', function (root) {
  console.log('Scan complete\nHere\'s the root obejct:', root);
});

/dirscanner/

    Package Sidebar

    Install

    npm i dirscanner

    Weekly Downloads

    2

    Version

    0.0.2

    License

    ISC

    Last publish

    Collaborators

    • simme