2,733
edits
Red Leader (talk | contribs) (→Functions: Begin include() doc) |
Red Leader (talk | contribs) (→flush(): Change file mode) |
||
Line 51: | Line 51: | ||
|param1text = File object as returned by {{func link|open()}}. | |param1text = File object as returned by {{func link|open()}}. | ||
|example1 = var path = getprop("/sim/fg-home") ~ '/Export/demo.txt'; | |example1 = var path = getprop("/sim/fg-home") ~ '/Export/demo.txt'; | ||
var file = io.open(path, "w | var file = io.open(path, "w"); # create and open file | ||
io.write(file, "Hello, World!"); # write (to the buffer) | io.write(file, "Hello, World!"); # write (to the buffer) | ||