Skip to content

FileText

Hyomoto edited this page Feb 25, 2021 · 13 revisions
Jump To Go Back Arguments Methods Variables

FileText( filename, read_only?, new? )

Implements: File

Used for creating, reading and saving text files. Files are written on a per-line basis, and calling read() will return the next line in the file.

var _file = new FileText("hello.txt", false, true )

_file.write("Hello World!")
_file.close();
Output: Writes Hello World to a text file and saves it as "hello.txt"

Arguments

Name Type Purpose
filename string the name of the file to open
read_only? bool optional: whether this file should allow writing to. Default: true
new? bool optional: whether this file should be blank. Default: false

Methods

Jump To top write save

write( _value )

Name Type Purpose
_value undef No description

Writes the given value to the end of the file.


save( append )

Name Type Purpose
append bool Whether to append or rewrite the file.

Saves the file to disk. If append is true, entries will be appended after the last position


Variables

Jump To top
  • name - No description.
Clone this wiki locally