You're mixing up two different approaches to reading the file.
When you use fs.createReadStream(), the file will be read automatically as
a stream, and you'll start seeing 'data' events with chunks of data as
they're read. With this model, you don't do the reading, the stream does it
On the other hand, if you want to read the file manually, you'll need to
open it using fs.open() first. Then you can use fs.read() calls to get the
I'd recommend the stream approach, unless there's some reason you can't do
On Sat, Nov 10, 2012 at 12:00 PM, Volkan Yazıcı <volkan.yaz...@gmail.com>wrote: