Promised version of the node.js `fs` module
JavaScript
Latest commit 19b939c Dec 23, 2015 @ForbesLindesay ForbesLindesay Update badges
Failed to load latest commit information.
test fix tests Feb 24, 2015
.gitignore Add tests Aug 16, 2013
.jshintrc add jshintrc and strict mode Apr 27, 2014
.travis.yml Add tests Aug 16, 2013
LICENSE initial commit Aug 16, 2013
README.md Update badges Dec 23, 2015
index.js add jshintrc and strict mode Apr 27, 2014
package.json 2.0.0 May 18, 2015

README.md

then-fs

Promised version of the node.js fs module. All non-callback-taking functions of fs are simply inherited.

Build Status Dependency Status NPM version

Installation

$ npm install then-fs

API

The API for then-fs is exactly that of the built in fs module except that any function which normally takes a callback returns a promise instead.

Example:

function readJSON(path) {
  return fs.readFile(path, 'utf8').then(JSON.parse)
}
readJSON(__dirname + '/package.json')
  .done(function (obj) {
    console.dir(oj)
  })

License

MIT