### Function

# Foundry file_read_link_recurse

since: 1.1

#### Declaration [src]

    DexFuture*
    foundry_file_read_link_recurse (
      GFile* file,
      guint max_depth
    )

#### Description [src]

Asynchronously resolves `file` by repeatedly following symbolic links until the result is not a symbolic link, or `max_depth` steps have been taken.

Uses a “seen” set to detect cycles: if the same `GFile` is encountered again while resolving, the future rejects with `G_IO_ERROR_FAILED` and message “Symbolic link loop detected”.

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.

`max_depth`

  Type: `guint`

  Maximum number of symbolic links to resolve (must be > 0).

#### 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.