### Method

# Hex Document set_file

#### Declaration

    gboolean
    hex_document_set_file (
      HexDocument* doc,
      GFile* file
    )

#### Description

Set the file of a `HexDocument` object by `GFile`.

Sets property | `Hex.Document:file`

#### Parameters

`file`

  Type: `GFile`

  A `GFile` pointing to a valid file on the system.

  The data is owned by the caller of the method.

#### Return value

Type: `gboolean`

`TRUE` if the operation was successful; `FALSE` otherwise.