Gio.FileEnumerator.prototype.get_child
function get_child(info: Gio.FileInfo): Gio.File { // Gjs wrapper for g_file_enumerator_get_child() }
Return a new Gio.File which refers to the file named by info in the source directory of enumerator. This function is primarily intended to be used inside loops with Gio.FileEnumerator.prototype.next_file.
This is a convenience method that's equivalent to: |[<!-- language="C" --> gchar *name = g_file_info_get_name (info); GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr), name); ]|
Since 2.36
- info
a Gio.FileInfo gotten from Gio.FileEnumerator.prototype.next_file or the async equivalents.
- Returns
a Gio.File for the Gio.FileInfo passed it.