### Method

# Ide CompileCommands load

#### Declaration

    gboolean
    ide_compile_commands_load (
      IdeCompileCommands* self,
      GFile* file,
      GCancellable* cancellable,
      GError** error
    )

#### Description

Synchronously 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_async()`

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.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `gboolean`
| `TRUE` if successful; otherwise `FALSE` and `error` is set.