Skip to content

FileText

Hyomoto edited this page Feb 24, 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 save

save( append )

Returns: N/A undefined

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 the file was written from.


Variables

Jump To top

No variables defined.

Clone this wiki locally