Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
defer/when style promise based filesystem API for NodeJS
tag: v0.0.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
README.md
package.json

README.md

promised-fs

Provides defer/when style promise based filesystem API for node.js. This alternative API allows writing code in a liniar fasion while still preserving asynchronous behavior.

Example

    var fs = require('promised-fs')
    ,   when = require('q').when

    var somePath = fs.workingDirectory().join('someFile.bla')
    var data = fs.read(somePath)
    var wroteTemp = fs.write('/some/path/temp.bla', data)

    when
    ( wroteTemp
    , function resovled() {
        doSomethingNow()
      }
    , function rejected(error) {
        doSomethingElseIfFailed(error)
      }
    )

Install

npm install promised-fs

Test

npm test promised-fs
Something went wrong with that request. Please try again.