>
> You need to attach an error event listener to the stream. Connections
> may terminate unexpectedly for a number of reasons. If you don't
> handle the error, you'll get the behaviour you're seeing now.

I was not able to find a way to specify a error handler when using
fs.createReadStream(path) for the input (static file). Is this
possible?

So I tried a 2 step approach using
fs.open(path, flags, mode, callback)
and then calling
fs.createReadStream(null, options)
in the open callback with options.fd set approriately

With this approach (err, fd) received by the callback is good at the
beginning. But subsequently fd becomes 'undefined' and err has
'Error: OK, success 'C:\files\test.dat' with err.errno being 0. Why is
fd undefined when there is no apparent error? Is there a way to view
underlying errors if any?

Thanks

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to