index.js
function copyFiles(srcfile, dstfile, callback) {
        var fs = require("fs");
        var rs = fs.createReadStream(srcfile);
        var ws = fs.createWriteStream(dstfile);
        rs.on("data", function(d) {
            ws.write(d);
        });
        rs.on("end", function() {
            ws.end();
            callback(true);
        });
    }
function copyFiles(srcfile, dstfile, callback) {
        var fs = require("fs");
        var rs = fs.createReadStream(srcfile);
        var ws = fs.createWriteStream(dstfile);
        rs.on("data", function(d) {
            ws.write(d);
        });
        rs.on("end", function() {
            ws.end();
            callback(true);
        });
    }
function copyFiles ( srcfile , dstfile , callback ) { var fs = require ( "fs" ) ; var rs = fs . createReadStream ( srcfile ) ; var ws = fs . createWriteStream ( dstfile ) ; rs . on ( "data" , function ( d ) { ws . write ( d ) ; } ) ; rs . on ( "end" , function ( ) { ws . end ( ) ; callback ( true ) ; } ) ; }
Copy file1 to file2
Copy file1 to file2