write_chars


Description:

public IOStatus write_chars (char[] buf, out size_t bytes_written) throws ConvertError, IOChannelError

Replacement for g_io_channel_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 ().

Parameters:

this

a IOChannel

buf

a buffer to write data from

bytes_written

The number of bytes written. This can be nonzero even if the return value is not g_io_status_normal. If the return value is g_io_status_normal and the channel is blocking, this will always be equal to count if count >= 0.

count

the size of the buffer. If -1, the buffer is taken to be a nul-terminated string.

Returns:

the status of the operation.