### Method

# Ide CompileCommands load_async

#### Declaration

    void
    ide_compile_commands_load_async (
      IdeCompileCommands* self,
      GFile* file,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description

Asynchronously loads the contents of the requested `file` and parses the JSON command database contained within.

You may only call this function once on an `IdeCompileCommands` object. If there is a failure, you must create a new `IdeCompileCommands` instance instead of calling this function again.

See also: `ide_compile_commands_load_finish()`

Available since: | 3.32

#### Parameters

`file` | `GFile`
| A `GFile`.
| The data is owned by the caller of the function.
`cancellable` | `GCancellable`
| A `GCancellable`, or `NULL`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`callback` | `GAsyncReadyCallback`
| The callback for the async operation.
| The argument can be `NULL`.
`user_data` | `gpointer`
| User data for `callback`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.