JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 104473
  • Score
    100M100P100Q26173F
  • License MIT

Filesystem methods as promises, with optional fs-extra and fs-graceful dependencies

Package Exports

  • fs-promise

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fs-promise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fs-promise

Build Status

Proxies all async fs methods exposing them as Promises/A+ compatible promises (when, Q, etc). Passes all sync methods through as values.

Also exposes to graceful-fs and/or fs-extra methods if they are installed.

Also works with any-promise library (a pollyfill, es6-promise, promise, native-promise-only, bluebird, rsvp, when, q).

var fsp = require('fs-promise');

fsp.writeFile(file('hello1'), 'hello world')
  .then(function(){
    return fsp.readFile(file('hello1'), {encoding:'utf8'});
  })
  .then(function(contents){});