FileT.loadPartialContentsAsync

Reads the partial contents of a file. A #GFileReadMoreCallback should be used to stop reading from the file when appropriate, else this function will behave exactly as g_file_load_contents_async(). This operation can be finished by g_file_load_partial_contents_finish().

Users of this function should be aware that @user_data is passed to both the @read_more_callback and the @callback.

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.

template FileT(TStruct)
void
loadPartialContentsAsync

Parameters

cancellable Cancellable

optional #GCancellable object, %NULL to ignore

readMoreCallback GFileReadMoreCallback

a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read

callback GAsyncReadyCallback

a #GAsyncReadyCallback to call when the request is satisfied

userData void*

the data to pass to the callback functions

Meta