mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
19 lines
473 B
JavaScript
19 lines
473 B
JavaScript
var f = new File;
|
|
f.onError = function (call) {
|
|
node.blocking.print("file error with " + call );
|
|
}
|
|
f.onOpen = function () {
|
|
node.blocking.print("file opened.");
|
|
f.write("hello world\n", function (status, written) {
|
|
|
|
node.blocking.print("written. status: "
|
|
+ status.toString()
|
|
+ " written: "
|
|
+ written.toString()
|
|
);
|
|
f.close();
|
|
});
|
|
};
|
|
|
|
f.open("/tmp/world", "a+");
|