nodejs用流来对文件操作
by 伍雪颖
var fs = require('fs'); var reader = fs.createReadStream('in.txt'); var writer = fs.createWriteStream('out.txt'); reader.pipe(writer);
时间: 2024-11-05 06:47:56
by 伍雪颖
var fs = require('fs'); var reader = fs.createReadStream('in.txt'); var writer = fs.createWriteStream('out.txt'); reader.pipe(writer);