Skip to content

Instantly share code, notes, and snippets.

@sharp
Created September 15, 2012 08:13
Show Gist options
  • Save sharp/3726948 to your computer and use it in GitHub Desktop.
Save sharp/3726948 to your computer and use it in GitHub Desktop.
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