GLib.MappedFile.get_contents

### Method

# GLib MappedFileget_contents

since: 2.8

#### Declaration

    gchar*
    g_mapped_file_get_contents (
      GMappedFile* file
    )

#### Description

Returns the contents of a `GMappedFile`.

Note that the contents may not be zero-terminated, even if the `GMappedFile` is backed by a text file.

If the file is empty then `NULL` is returned.

Available since: 2.8

#### Return value

Type: `gchar*`

The contents of `file`, or `NULL`.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.