Package org.gnome.gtk

Class DirectoryList<T extends GObject>

java.lang.Object
All Implemented Interfaces:
Proxy, ListModelJavaList<T>, Iterable<T>, Collection<T>, List<T>, SequencedCollection<T>, ListModel<T>

@Generated("io.github.jwharm.JavaGI") public class DirectoryList<T extends GObject> extends GObject implements ListModel<T>
GtkDirectoryList is a list model that wraps g_file_enumerate_children_async().

It presents a GListModel and fills it asynchronously with the GFileInfos returned from that function.

Enumeration will start automatically when the Gtk.DirectoryList:file property is set.

While the GtkDirectoryList is being filled, the Gtk.DirectoryList: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 Gtk.DirectoryList:error property will be set to give more indication about the failure.

The GFileInfos 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 g_file_enumerator_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.