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
447 B

16 years ago
var f = new File;
f.open("/tmp/world", "a+", function (status) {
if (status == 0) {
stdout.puts("file open");
f.write("hello world\n", function (status, written) {
16 years ago
stdout.puts("written. status: "
+ status.toString()
+ " written: "
+ written.toString()
);
f.close();
});
} else {
stdout.puts("file open failed: " + status.toString());
}
});