has_parent


Description:

[ Version ( since = "2.24" ) ]
public bool has_parent (File? parent)

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

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

Parameters:

this

input File

parent

the parent to check for, or null

Returns:

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