Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created February 5, 2013 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/4715523 to your computer and use it in GitHub Desktop.
Save isaacs/4715523 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var stream = fs.createReadStream(__filename, { bufferSize: 10 });
fs.read = function(orig) { return function(a,b,c, size, d, e) {
console.log('READ', size);
return orig(a, b, c, size, d, e);
} }(fs.read);
stream.resume();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment