Nasal library/io: Difference between revisions

Jump to navigation Jump to search
→‎flush(): Change file mode
(→‎Functions: Begin include() doc)
(→‎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+"); # create and open file
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)


Navigation menu