var fs = require("fs");
var readStream= fs.createReadStream('input.txt');
var writeStream=fs.createWriteStream('output.txt');
readStream.pipe(writeStream);
console.log("hello...world");
In the above program, readStream
and writeStream
operations are done by pipe function..what was the internal code and internal process happening in the pipe()
?