FileT.hasParent

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.

template FileT()
override
bool
hasParent
(
gio.file.File parent = null
)

Parameters

parent gio.file.File

the parent to check for, or null

Return Value

Type: bool

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