pollableStreamWriteAll
bool pollableStreamWriteAll(gio.output_stream.OutputStream stream, ubyte[] buffer, bool blocking, out size_t bytesWritten, gio.cancellable.Cancellable cancellable = null)Tries to write count bytes to stream, as with [gio.output_stream.OutputStream.writeAll], but using [gio.global.pollableStreamWrite] rather than [gio.output_stream.OutputStream.write].
On a successful write of count bytes, true is returned, and bytes_written is set to count.
If there is an error during the operation (including [gio.types.IOErrorEnum.WouldBlock] in the non-blocking case), false is returned and error is set to indicate the error status, bytes_written is updated to contain the number of bytes written into the stream before the error occurred.
As with [gio.global.pollableStreamWrite], if blocking is false, then stream must be a #GPollableOutputStream for which [gio.pollable_output_stream.PollableOutputStream.canPoll] returns true or else the behavior is undefined. If blocking is true, then stream does not need to be a #GPollableOutputStream.
Parameters
stream | a #GOutputStream. |
buffer | the buffer containing the data to write. |
blocking | whether to do blocking I/O |
bytesWritten | location to store the number of bytes that was written to the stream |
cancellable | optional #GCancellable object, null to ignore. |