GLib.IOChannel.prototype.write_chars
function write_chars(buf: ByteArray, count: Number(gssize)): [return_value: GLib.IOStatus, bytes_written: Number(gsize)] {
// Gjs wrapper for g_io_channel_write_chars()
}
Replacement for GLib.IOChannel.prototype.write with the new API.
On seekable channels with encodings other than null or UTF-8, generic mixing of reading and writing is not allowed. A call to g_io_channel_write_chars () may only be made on a channel from which data has been read in the cases described in the documentation for g_io_channel_set_encoding ().
- buf
a buffer to write data from
- count
the size of the buffer. If -1, the buffer is taken to be a nul-terminated string.
- return_value
the status of the operation.
- bytes_written
The number of bytes written. This can be nonzero even if the return value is not GLib.IOStatus.normal. If the return value is GLib.IOStatus.normal and the channel is blocking, this will always be equal to count if count >= 0.