Method
GioFileload_bytes_async
since: 2.56
Declaration [src]
void
g_file_load_bytes_async (
GFile* file,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
)
Description [src]
Asynchronously loads the contents of file as GBytes.
If file is a resource:// based URI, the resulting bytes will reference the
embedded resource instead of a copy. Otherwise, this is equivalent to calling
g_file_load_contents_async() and g_bytes_new_take().
callback should call g_file_load_bytes_finish() to get the result of this
asynchronous operation.
See g_file_load_bytes() for more information.
Available since: 2.56
This method completes asynchronously. Use g_file_load_bytes_finish() inside the GAsyncReadyCallback to obtain the result of the operation.
Parameters
cancellable-
Type:
GCancellableA
GCancellableorNULL.The argument can be NULL.The data is owned by the caller of the method. callback-
Type:
GAsyncReadyCallbackA
GAsyncReadyCallbackto call when the request is satisfied.The argument can be NULL. user_data-
Type:
gpointerThe data to pass to callback function.
The argument can be NULL.The data is owned by the caller of the method.