appendFile

Appends contents to the file located at path. If create is true, then file is created if it does not exist. For binary files, use encoding = ContentEncoding.Base64. The original contents are left unchanged.

If the encoding = ContentEncoding.Base64, then existing contents are first read decoded into a UTF-8 string. The new contents are appended and a new Base64 representation of the concatenated string is written to the file.

Returns true if operation is successful, otherwise false.

common
fun appendFile(path: String, contents: String, create: Boolean, encoding: ContentEncoding): Boolean
fun appendFile(path: String, contents: String, create: Boolean, encoding: ContentEncoding): Boolean
fun appendFile(pathComponent: PathComponent, contents: String, create: Boolean, encoding: ContentEncoding): Boolean
fun appendFile(path: String, contents: String, create: Boolean, encoding: ContentEncoding): Boolean
fun appendFile(pathComponent: PathComponent, contents: String, create: Boolean, encoding: ContentEncoding): Boolean

Appends contents to the file located at path. If create is true, then file is created if it does not exist. For binary files, use encoding = ContentEncoding.Base64. The original contents are left unchanged.

If the encoding = ContentEncoding.Base64, then existing contents are first read decoded into a UTF-8 string. The new contents are appended and a new Base64 representation of the concatenated string is written to the file.

Returns true if operation is successful, otherwise false.

js
fun appendFile(path: String, contents: String, create: Boolean, encoding: ContentEncoding): Boolean

Appends contents to the file located at pathComponent. If create is true, then file is created if it does not exist. For binary files, use encoding = ContentEncoding.Base64. The original contents are left unchanged.

If the encoding = ContentEncoding.Base64, then existing contents are first read decoded into a UTF-8 string. The new contents are appended and a new Base64 representation of the concatenated string is written to the file.

Returns true if operation is successful, otherwise false.

common
fun appendFile(pathComponent: PathComponent, contents: String, create: Boolean, encoding: ContentEncoding): Boolean

Appends contents to the file located at pathComponent. If create is true, then file is created if it does not exist. For binary files, use encoding = ContentEncoding.Base64. The original contents are left unchanged.

If the encoding = ContentEncoding.Base64, then existing contents are first read decoded into a UTF-8 string. The new contents are appended and a new Base64 representation of the concatenated string is written to the file.

Returns true if operation is successful, otherwise false.

js
fun appendFile(pathComponent: PathComponent, contents: String, create: Boolean, encoding: ContentEncoding): Boolean