single line file copy

PHOTO EMBED

Mon Jun 08 2020 10:15:25 GMT+0000 (Coordinated Universal Time)

Saved by @salitha.pathi #nodejs #fs #javascript

var fs = require('fs');

fs.createReadStream('test.log').pipe(fs.createWriteStream('newLog.log'));
content_copyCOPY

https://lavalite.org/blog/fastest-method-to-copy-file-in-nodejs