### Function

# Foundry file_read_link

since: 1.1

#### Declaration [src]

    DexFuture*
    foundry_file_read_link (
      GFile* file
    )

#### Description [src]

Asynchronously resolves `file` if it is a symbolic link.

If `file` is not a symbolic link (as determined by `g_file_query_info()` with `G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK`), the future resolves to `file` itself. If it is a symbolic link, the link target is read with `g_file_read_link()` and a new `GFile` for the resolved path is returned. On failure, the future rejects with an error.

The work is performed in a fiber on the thread pool scheduler.

Available since: 1.1

#### Parameters

`file`

  Type: `GFile`

  A `GFile`.

  The data is owned by the caller of the function.

#### Return value

Type: `DexFuture`

A `DexFuture` that resolves to a `GFile`, or rejects with `GError`.

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