### Function

# GioUnix mount_points_get_from_file

since: 2.82

#### Declaration [src]

    GUnixMountPoint**
    g_unix_mount_points_get_from_file (
      const char* table_path,
      uint64_t* time_read_out,
      size_t* n_points_out
    )

#### Description [src]

Gets an array of `GUnixMountPoint`s containing the Unix mount points listed in `table_path`.

This is a generalized version of `g_unix_mount_points_get()`, mainly intended for internal testing use. Note that `g_unix_mount_points_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

#### Parameters

`table_path`

  Type: `const char*`

  Path to the mount points table file (for example `/etc/fstab`).

  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_points_out`

  Type: `size_t*`

  Return location for the number of mount points returned.

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

#### Return value

Type: An array of `GUnixMountPoint*`

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

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