mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
473 B
19 lines
473 B
16 years ago
|
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+");
|