Object Hierarchy:

Object hierarchy for DirectoryList


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

DirectoryList is a list model that wraps enumerate_children_async.

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

Enumeration will start automatically when a the file property is set.

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

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

The FileInfos returned from a DirectoryList have the "standard:file" attribute set to the File 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 DirectoryList but can access the File directly from the FileInfo when operating with a ListView or similar.

Namespace: Gtk
Package: gtk4



Creation methods:


Inherited Members:

All known members inherited from interface GLib.ListModel