Created
January 26, 2011 13:13
-
-
Save niklasfi/796663 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
var sys = require('sys'), | |
fs = require('fs'); | |
var b=new Buffer('hello world'); | |
fs.open('test','w',undefined, function(err,fd){ | |
if(err) throw err; | |
fs.write(fd,b,0,b.length,3,function(err,written){ | |
console.log(written + " bytes were written"); | |
fs.close(fd); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment