dreader

0.1.1 • Public • Published

DReader

A simple package to get a list of files / directories with some primary information inside a directory.

Installation

npm install dreader --save

Usage

const DReader  = require('dreader');

// to load the content of a Directory (Only loads the given directory without its subdirectories)
DReader.folderScan('path/to/directory/', false);
// to load the content of a Directory recursive
DReader.folderScan('path/to/directory/', true);

// Use a Blacklist to exclude files / directores or file extensions
var Blacklist = [
    {name: 'filename', file: true},
    {name: '.extension', extension: true},
    {name: 'directory', directory: true}
]

DReader.folderScan('path/to/directory/', true, Blacklist);

Node

A Node represent a file or a directory with its childrean elements with the following Data:

  • path : contains the path of the element
  • type : contains eather 'file' or 'directory'
  • size : size of the element
  • stats : fs.stats
  • chicldrean : contains all directory elements if recursive is used

Readme

Keywords

none

Package Sidebar

Install

npm i dreader

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

10.3 kB

Total Files

7

Last publish

Collaborators

  • zuritor