### Method

# Foundry LanguageGuesser guess

#### Declaration [src]

    DexFuture*
    foundry_language_guesser_guess (
      FoundryLanguageGuesser* self,
      GFile* file,
      const char* content_type,
      GBytes* contents
    )

#### Description [src]

Guess the language for a file, content_type, or contents.

One of `file`, `content_type`, or `contents` must be set.

#### Parameters

`file`

  Type: `GFile`

  A `GFile` or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`content_type`

  Type: `const char*`

  A content-type as a string or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`contents`

  Type: `GBytes`

  A `GBytes` of file contents or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

#### Return value

Type: `DexFuture`

A `DexFuture` that resolves to a string containing the source code language or rejects with a new `GError`.

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