Skip to content

Instantly share code, notes, and snippets.

@xk
Forked from niklasfi/nodejs
Created January 27, 2011 19:01
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 xk/798998 to your computer and use it in GitHub Desktop.
Save xk/798998 to your computer and use it in GitHub Desktop.
var k= require('constants');
var fs = require('fs')
var b = new Buffer('AAAAAAAAAA');
fs.open('./f', k.O_WRONLY, 0666 , cb);
function cb (err, fd) {
fs.write(fd,b,0,10,10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment