Created
September 15, 2012 08:13
-
-
Save sharp/3726948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Start", new Date().getTime()); | |
var fs = require('fs'); | |
for (var i = 1; i < 10; i++) { | |
fs.readFile("test.mp4",function(err, data) { | |
if(err) | |
console.log("read error: ", err); | |
else { | |
fs.writeFile(__dirname + "/new.mp4", data , function(err) { | |
if(err) { | |
console.log("write error: ", err); | |
} | |
}); | |
} | |
}); | |
}; | |
process.on('exit', function () { | |
console.log("Finished", new Date().getTime()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment