Created
February 16, 2010 00:53
-
-
Save guanix/305163 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open("path.tmp") | |
.then(function (stream) { | |
return stream.write("some text"); | |
}).then(function (stream) { | |
return stream.close(); | |
}).then(function () { | |
return rename("path.tmp", "path"); | |
}, function (e) { | |
// one error handler for an error at any point in the chain | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment