Skip to content
Simple recursive file and directory reader using synchronous node fs calls
JavaScript
Find file
Latest commit 1516df6 @clux also make npm readable
Failed to load latest commit information.
LICENSE init
README.md also make npm readable
fsx.js reordering
package.json

README.md

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],
}
Something went wrong with that request. Please try again.