var fs = require('fs'); var readStream = fs.createReadStream('file.txt'); readStream.setEncoding('utf8'); var information = ''; readStream.on('data', function(chunk) { console.log('------------------------------------------------------------'); information += chunk; //console.log(chunk); }) readStream.on('end', function(chunk) { console.log(data); console.log('--------------------End----------------------------------------'); })
Node.Js Tutorial For Beginners Eleven - Basics Of Streams - Readable Stream
Posted by Hold
on February 05, 2017
0 comments:
Post a Comment