Method

GioFilehas_parent

since: 2.24

Declaration [src]

gboolean
g_file_has_parent (
  GFile* file,
  GFile* parent
)

Description [src]

Checks if file has a parent, and optionally, if it is parent.

If parent is NULL then this function returns TRUE if file has any parent at all. If parent is non-NULL then TRUE is only returned if file is an immediate child of parent.

Available since: 2.24

Parameters

parent

Type: GFile

The parent to check for, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.

Return value

Type: gboolean

TRUE if file is an immediate child of parent (or any parent in the case that parent is NULL).