### Method

# Ide Context build_file

#### Declaration

    GFile*
    ide_context_build_file (
      IdeContext* self,
      const gchar* path
    )

#### Description

Creates a new `GFile` for the path.

- If `path` is `NULL`, `IdeContext:workdir` is returned.
- If `path` is absolute, a new `GFile` to the absolute path is returned.
- Otherwise, a `GFile` child of `IdeContext:workdir` is returned.

Available since: | 3.32

#### Parameters

`path` | `const gchar*`
| A path to the file.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `GFile`
| A `GFile`.
| The caller of the method takes ownership of the data, and is responsible for freeing it.