Skip to content

Instantly share code, notes, and snippets.

@JakubOboza
Created March 12, 2012 23:04
Show Gist options
  • Save JakubOboza/2025275 to your computer and use it in GitHub Desktop.
Save JakubOboza/2025275 to your computer and use it in GitHub Desktop.
danf
// callback
fs.readFile('/tmp/largefile', function (err, data) {
if (err) throw err;
process_content(data);
});
// bloating
var data = fs.readFileSync("/tmp/largefile");
process_content(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment