read_stream_sync


Description:

[ Version ( since = "2.32" ) ]
public bool read_stream_sync (InputStream stream, Cancellable? cancellable = null) throws Error

Reads stream and writes the data from it to this.

Before calling this function, you may need to call [[email protected]_base_uri] or [[email protected]_base_gfile] to set the "base file" for resolving references to external resources. SVG elements like `<image>` which reference external resources will be resolved relative to the location you specify with those functions.

If cancellable is not `NULL`, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be returned.

Parameters:

this

a [[email protected]]

stream

a `GInputStream`

cancellable

a `GCancellable`, or `NULL`

Returns:

`TRUE` if reading stream succeeded, or `FALSE` otherwise with throws filled in




2022 vala-language.org