DirectoryList


Object Hierarchy:

Gtk.DirectoryList Gtk.DirectoryList Gtk.DirectoryList GLib.Object GLib.Object GLib.Object->Gtk.DirectoryList GLib.ListModel GLib.ListModel GLib.ListModel->Gtk.DirectoryList

Description:

[ CCode ( type_id = "gtk_directory_list_get_type ()" ) ]
public class DirectoryList : Object, ListModel

`GtkDirectoryList` is a list model that wraps enumerate_children_async.

It presents a `GListModel` and fills it asynchronously with the `GFileInfo`s returned from that function.

Enumeration will start automatically when a the [[email protected]:file] property is set.

While the `GtkDirectoryList` is being filled, the [[email protected]:loading] property will be set to true. You can listen to that property if you want to show information like a `GtkSpinner` or a "Loading..." text.

If loading fails at any point, the [[email protected]:error] property will be set to give more indication about the failure.

The `GFileInfo`s returned from a `GtkDirectoryList` have the "standard:file" attribute set to the `GFile` they refer to. This way you can get at the file that is referred to in the same way you would via get_child. This means you do not need access to the `GtkDirectoryList`, but can access the `GFile` directly from the `GFileInfo` when operating with a `GtkListView` or similar.


Namespace: Gtk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object
All known members inherited from interface GLib.ListModel



2022 vala-language.org