Hex.Document.new_from_file
Description: Reference for Hex.Document.new_from_file

### Constructor

# Hex Documentnew_from_file

#### Declaration

    HexDocument*
    hex_document_new_from_file (
      GFile* file
    )

#### Description

A convenience method to create a new `HexDocument` from file.

#### Parameters

`file` | `GFile`
| A `GFile` pointing to a valid file on the system.
| The data is owned by the caller of the function.

#### Return value

Returns: | `HexDocument`
| A `HexDocument` pre-loaded with a `GFile` ready for a `read` operation, or `NULL` if the operation failed.
| The caller of the function takes ownership of the data, and is responsible for freeing it.