Gio.FileEnumerator.prototype.next_file
function next_file(cancellable: Gio.Cancellable): Gio.FileInfo { // Gjs wrapper for g_file_enumerator_next_file() }
Returns information for the next file in the enumerated object. Will block until the information is available. The Gio.FileInfo returned from this function will contain attributes that match the attribute string that was passed when the Gio.FileEnumerator was created.
See the documentation of Gio.FileEnumerator for information about the order of returned files.
On error, returns null and sets @error to the error. If the enumerator is at the end, null will be returned and @error will be unset.
- cancellable
optional Gio.Cancellable object, null to ignore.
- Returns
A Gio.FileInfo or null on error or end of enumerator. Free the returned object with GObject.Object.prototype.unref when no longer needed.