DirectoryList

open class DirectoryList(val gtkDirectoryListPointer: <Error class: unknown class><<Error class: unknown class>>)

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 property@Gtk.DirectoryList:file property is set.

While the GtkDirectoryList is being filled, the property@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 property@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.

Skipped during bindings generation

  • method item-type: Property has no getter nor setter

  • method loading: Property has no getter nor setter

  • method n-items: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(attributes: String? = null, file: <Error class: unknown class>? = null)

Creates a new GtkDirectoryList.

constructor(gtkDirectoryListPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open var attributes: String?

The attributes to query.

Link copied to clipboard
open val error: <Error class: unknown class>?

Error encountered while loading files.

Link copied to clipboard
open var file: <Error class: unknown class>?

File to query.

Link copied to clipboard
open val gioListModelPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtkDirectoryListPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var ioPriority: <Error class: unknown class>

Priority used when loading.

Link copied to clipboard
open var monitored: Boolean

true if the directory is monitored for changed.

Functions

Link copied to clipboard
open fun isLoading(): Boolean

Returns true if the children enumeration is currently in progress.