Here is what I want to do:
stream = fs.WriteStream('crap.txt',{flags:'w'};
// more code
response.on('close',function() {
// is the below line possible?
fs.stat(stream.name, function(stats) {
console.log(stats.size);
});
stream.end();
});
So can I get the filename from the stream object? An illustrated example would be nice, with reference to good tutorial/docs (containing examples) on writable streams.
It's fs.createWriteStream
and stream.path
You can console.dir(stream)
to find all it's properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With