g_file_load_partial_contents_async (
  GFile* file,
  GCancellable* cancellable,
  GFileReadMoreCallback read_more_callback,
  GAsyncReadyCallback callback,
  gpointer user_data


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.

This method is not directly available to language bindings.


cancellable GCancellable

Optional GCancellable object, NULL to ignore.

 The argument can be NULL.
 The data is owned by the caller of the function.
read_more_callback 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.

 The argument can be NULL.
user_data gpointer

The data to pass to the callback functions.

 The argument can be NULL.
 The data is owned by the caller of the function.