appendToFile

open fun appendToFile(path: String, content: String, createIfNotExists: Boolean)

Append content to a file, creating it if it doesn't exist. If create is true, the file will be created if it doesn't exist. If createIfNotExists is false, an exception will be thrown if the file doesn't exist.