klyn.io.FileWriter.FileWriter
constructor

    public FileWriter(filePath as String, append as Boolean = false, encoding as String = "utf-8"):

Description

Creates a file text writer and truncates the target file.

Parameters

Parameter | Description
--- | ---
`filePath` | File to write.
`append` | Whether to append instead of truncating the file.
`encoding` | Text encoding. Only UTF-8 is currently supported.

Example

    try writer = FileWriter("notes.txt", append=true, encoding="utf-8"):
    writer.writeLine("hello")