openWrite
Opens a File for write operations.
e.g.
"/path/to/my/file".toFile().openWrite(excl = null, false).use { s ->
// write
}Content copied to clipboard
Return
A FileStream.Write for write-only operations.
Parameters
excl
The OpenExcl desired for this open operation. If null, then OpenExcl.MaybeCreate.DEFAULT will be used.
appending
If true, data written to this file will occur at the end of the file. If false, the file will be truncated if it exists.
See also
Throws
UnsupportedOperationException
On Kotlin/JS-Browser.
Opens a File for write operations. The File will be truncated if it exists.
e.g.
"/path/to/my/file".toFile().openWrite(excl = null).use { s ->
// write
}Content copied to clipboard
Return
A FileStream.Write for write-only operations.
Parameters
excl
The OpenExcl desired for this open operation. If null, then OpenExcl.MaybeCreate.DEFAULT will be used.
See also
Throws
UnsupportedOperationException
On Kotlin/JS-Browser.