append

inline fun File.append(excl: OpenExcl?, data: Buffer)(source)

Writes the contents of a Buffer to the file associated with the abstract pathname. If the file exists, all new data will be appended to the end of the file.

docs

Parameters

excl

The OpenExcl desired for this open operation. If null, then OpenExcl.MaybeCreate.DEFAULT will be used.

Throws

If there was a failure to open the File for the provided excl argument, if the File points to an existing directory, or if the filesystem threw a security exception.

UnsupportedOperationException

If Node.js is not being used.

inline fun File.append(excl: OpenExcl?, src: ByteBuffer): Int(source)

Writes the remaining contents of src to the file. If the file exists, all new data will be appended to the end of the file.

Return

The number of bytes written to the file.

Parameters

excl

The OpenExcl desired for this open operation. If null, then OpenExcl.MaybeCreate.DEFAULT will be used.

src

of bytes to write.

See also

Throws

If there was a failure to open the File for the provided excl argument, if the File points to an existing directory, or if the filesystem threw a security exception.