### Method

# Gio File load_bytes_finish

since: 2.56

#### Declaration [src]

    GBytes*
    g_file_load_bytes_finish (
      GFile* file,
      GAsyncResult* result,
      gchar** etag_out,
      GError** error
    )

#### Description [src]

Completes an asynchronous request to g_file_load_bytes_async().

For resources, `etag_out` will be set to `NULL`.

The data contained in the resulting `GBytes` is always zero-terminated, but this is not included in the `GBytes` length. The resulting `GBytes` should be freed with `g_bytes_unref()` when no longer in use.

See `g_file_load_bytes()` for more information.

Available since: 2.56

#### Parameters

`result`

  Type: `GAsyncResult`

  A `GAsyncResult` provided to the callback.

  The data is owned by the caller of the method.

`etag_out`

  Type: `gchar**`

  A location to place the current entity tag for the file, or `NULL` if the entity tag is not needed.

  The argument will be set by the function.
  The argument can be set to `NULL` by the method.
  The argument can be `NULL`.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.
  The value is a NUL terminated UTF-8 string.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `GBytes`

A `GBytes` or `NULL` and `error` is set.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.