gtk.directory_list
Module for [DirectoryList] class
Types 3
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.file property is set.
While the gtk.directory_list.DirectoryList is being filled, the gtk.directory_list.DirectoryList.loading 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.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.
DirectoryListGidBuilder builder() static nothrowGet builder for [gtk.directory_list.DirectoryList] Returns: New builder objectvoid attributes(string propval) @property nothrowSet `attributes` property. Params: propval = The attributes to query.glib.error.ErrorWrap error() @property nothrowGet `error` property. Returns: Error encountered while loading files.void file(gio.file.File propval) @property nothrowSet `file` property. Params: propval = File to query.void ioPriority(int propval) @property nothrowSet `ioPriority` property. Params: propval = Priority used when loading.gobject.types.GType itemType() @property nothrowGet `itemType` property. Returns: The type of items. See [gio.list_model.ListModel.getItemType].bool monitored() @property nothrowGet `monitored` property. Returns: true if the directory is monitored for changed.void monitored(bool propval) @property nothrowSet `monitored` property. Params: propval = true if the directory is monitored for changed.uint nItems() @property nothrowGet `nItems` property. Returns: The number of items. See [gio.list_model.ListModel.getNItems].string getAttributes() nothrowGets the attributes queried on the children. Returns: The queried attributesgio.file.File getFile() nothrowGets the file whose children are currently enumerated. Returns: The file whose children are enumeratedint getIoPriority() nothrowGets the IO priority set via [gtk.directory_list.DirectoryList.setIoPriority]. Returns: The IO priority.bool getMonitored() nothrowReturns whether the directory list is monitoring the directory for changes. Returns: true if the directory is monitoredvoid setAttributes(string attributes = null) nothrowSets the attributes to be enumerated and starts the enumeration.void setFile(gio.file.File file = null) nothrowSets the file to be enumerated and starts the enumeration.void setMonitored(bool monitored) nothrowSets whether the directory list will monitor the directory for changes.this(string attributes = null, gio.file.File file = null)Creates a new [gtk.directory_list.DirectoryList].Fluent builder implementation template for gtk.directory_list.DirectoryList
T attributes(string propval) nothrowSet `attributes` property. Params: propval = The attributes to query. Returns: Builder instance for fluent chainingT file(gio.file.File propval) nothrowSet `file` property. Params: propval = File to query. Returns: Builder instance for fluent chainingT ioPriority(int propval) nothrowSet `ioPriority` property. Params: propval = Priority used when loading. Returns: Builder instance for fluent chainingT monitored(bool propval) nothrowSet `monitored` property. Params: propval = true if the directory is monitored for changed. Returns: Builder instance for fluent chainingFluent builder for gtk.directory_list.DirectoryList