Module stream

Utilities to handle Gio streams.

License GPL v3.0

Table of contents

Constructors

new_dummy_input() Creates a dummy input stream.
new_dummy_output() Creates a dummy output stream.
to_io_stream([input_stream[, output_stream]]) Combines an input and output stream into a single IOStream.

Utilities

read_string(stream, cb) Reads the entire stream into memory.

Constructors

new_dummy_input() [src]
Creates a dummy input stream.

Gio currently supports asynchronous splicing only between IOStreams, which combine both an input and output stream. To be able to splice from just an output stream to just an input stream, dummy streams can be used to provide the “ignored” side of the pipe.

See docs.gtk.org for additional details.

Returns:

  • type Gio.MemoryInputStream
new_dummy_output() [src]
Creates a dummy output stream.

Gio currently supports asynchronous splicing only between IOStreams, which combine both an input and output stream. To be able to splice from just an output stream to just an input stream, dummy streams can be used to provide the “ignored” side of the pipe.

See docs.gtk.org for additional details.

Returns:

  • type Gio.MemoryOutputStream
to_io_stream([input_stream[, output_stream]]) [src]
Combines an input and output stream into a single IOStream.

Either side may be omitted, in which case a dummy stream is used instead.

See docs.gtk.org for additional details.

Parameters:

  • input_stream
    type Gio.InputStream
    optional
  • output_stream
    type Gio.OutputStream
    optional

Returns:

  • type Gio.SimpleIOStream

Utilities

read_string(stream, cb) [src]
async
since v0.2.0
Reads the entire stream into memory.

Parameters:

  • stream :  The stream to read from.
    type Gio.InputStream
  • cb
    type function

Callback parameters:

  • type GLib.Error
  • type nil or string