klyn.io.FileWriter.FileWriter
constructor
public FileWriter(filePath as Path, append as Boolean = false, encoding as String = "utf-8"):
Description

Creates a file text writer and truncates the target file.

Parameters
ParameterDescription
filePathFile to write.
appendWhether to append instead of truncating the file.
encodingText encoding. Only UTF-8 is currently supported.
Example
try writer = FileWriter(Path("notes.txt"), append=true, encoding="utf-8"):
writer.writeLine("hello")