### Function

# GioUnix mounts_get_from_file

deprecated: 2.84 since: 2.82

#### Declaration [src]

    GUnixMountEntry**
    g_unix_mounts_get_from_file (
      const char* table_path,
      uint64_t* time_read_out,
      size_t* n_entries_out
    )

#### Description [src]

Gets an array of `GUnixMountEntry`s containing the Unix mounts listed in `table_path`.

This is a generalized version of `g_unix_mount_entries_get()`, mainly intended for internal testing use. Note that `g_unix_mount_entries_get()` may parse multiple hierarchical table files, so this function is not a direct superset of its functionality.

If there is an error reading or parsing the file, `NULL` will be returned and both out parameters will be set to `0`.

Available since: 2.82

Deprecated since: 2.84

Use `g_unix_mount_entries_get_from_file()` instead.

#### Parameters

`table_path`

  Type: `const char*`

  Path to the mounts table file (for example `/proc/self/mountinfo`).

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`time_read_out`

  Type: `uint64_t*`

  Return location for the modification time of `table_path`.

  The argument will be set by the function.
  The argument can be `NULL`.

`n_entries_out`

  Type: `size_t*`

  Return location for the number of mount entries returned.

  The argument will be set by the function.
  The argument can be `NULL`.

#### Return value

Type: An array of `GUnixMountEntry*`

Mount entries, or `NULL` if there was an error loading them.

The length of the array is in the `n_entries_out` argument.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.