-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write()
resolves before content is written
#149
Comments
Using the var qfs = require('q-io/fs')
qfs.write('abc.txt', 'this is the file contents')
// .delay(1000)
.done(function () {
qfs.read('abc.txt').done(console.log)
}) |
Thanks. A PR would be most welcome. |
Where is the |
Methods of streams are in one of the stream modules, and in particular interest for these purposes, the Node bindings for streams. I don’t recall the specific module off-hand. I may be of more assistance after business hours. |
It isn't |
The following code-snippets seems not to work as expected in node 4.1:
In nodejs 0.10.38, this outputs the line
this is the file contents
, in node 4.1.0, I only get an empty line in the output. It seems like the promise is resolved before the contents is written. Removing the comment in front of the.delay(1000)
causes the correct line to appear.The text was updated successfully, but these errors were encountered: