GtkDirectoryList

gtk.directory_list.DirectoryList is a list model that wraps gio.file.File.enumerateChildrenAsync.

It presents a gio.list_model.ListModel and fills it asynchronously with the gio.file_info.FileInfos returned from that function.

Enumeration will start automatically when the gtk.directory_list.DirectoryList.Gio.File property is set.

While the gtk.directory_list.DirectoryList is being filled, the gtk.directory_list.DirectoryList.gboolean property will be set to true. You can listen to that property if you want to show information like a gtk.spinner.Spinner or a "Loading..." text.

If loading fails at any point, the gtk.directory_list.DirectoryList.GLib.Error property will be set to give more indication about the failure.

The gio.file_info.FileInfos returned from a gtk.directory_list.DirectoryList have the "standard::file" attribute set to the gio.file.File they refer to. This way you can get at the file that is referred to in the same way you would via gio.file_enumerator.FileEnumerator.getChild. This means you do not need access to the gtk.directory_list.DirectoryList, but can access the gio.file.File directly from the gio.file_info.FileInfo when operating with a gtk.list_view.ListView or similar.

struct GtkDirectoryList