Gio.File.prototype.has_parent
function has_parent(parent: Gio.File): Boolean {
// Gjs wrapper for g_file_has_parent()
}
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 a child of parent.
Since 2.24
- parent
the parent to check for, or null
- Returns
true if file is a child of parent (or any parent in the case that parent is null).