fsx

Simple recursive file and directory reader using synchronous node fs calls

npm install fsx
3 downloads in the last week
14 downloads in the last month

fsx

Just a small utility that I had to copy for many of my modules. Will scan a directory recursively, keep track of both files and directories, and return two flattened arrays.

Install with

npm install fsx

then

var fsx = require('fsx');
var output = fsx.readDirSync(dir);

yielding:

console.log(output);
->
{
  dirs: [pathstodirs],
  files: [paths to files],
}
npm loves you