It derives from <GObject>.
A list model that wraps file:enumerate-children-async.
It presents a <GListModel> and fills it
asynchronously with the <GFileInfo>s returned
from that function.
Enumeration will start automatically when the directory-list:file property is set.
While the <GtkDirectoryList> is being
filled, the directory-list:loading property will be set to #t. 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 directory-list:error property will be set to give more
indication about the failure.
The <GFileInfo>s 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 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.
The attributes to query.
Its value is a string, or #f.
Set it with (set! (directory-list:attributes self) value).
Error encountered while loading files.
Its value is a <GError>, or #f.
It is read only.
File to query.
Its value is a <GFile>, or #f.
Set it with (set! (directory-list:file self) value).
Priority used when loading.
Its value is a 32-bit integer.
Set it with (set! (directory-list:io-priority self) value).
The type of items. See list-model:get-item-type.
Its value is a class, or a GType number.
It is read only.
#t if files are being loaded.
Its value is a boolean.
It is read only.
#t if the directory is monitored for changed.
Its value is a boolean.
Set it with (set! (directory-list:monitored self) value).
The number of items. See list-model:get-n-items.
Its value is an unsigned 32-bit integer.
It is read only.
Gets the attributes queried on the children.
Passed: a <GtkDirectoryList>.
Returned: a string, or #f.
The queried attributes
Gets the loading error, if any.
If an error occurs during the loading process, the loading process will finish and this property allows querying the error that happened. This error will persist until a file is loaded again.
An error being set does not mean that no files were loaded, and all successfully queried files will remain in the list.
Passed: a <GtkDirectoryList>.
Returned: a <GError>, or #f.
The loading error or #f if loading finished successfully
Gets the file whose children are currently enumerated.
Passed: a <GtkDirectoryList>.
Returned: a <GFile>, or #f.
The file whose children are enumerated
Gets the IO priority set via directory-list:set-io-priority.
Passed: a <GtkDirectoryList>.
Returned: a 32-bit integer.
The IO priority.
Returns whether the directory list is monitoring the directory for changes.
Passed: a <GtkDirectoryList>.
Returned: a boolean.
#t if the directory is monitored
Returns #t if the children enumeration is currently in progress.
Files will be added to self from time to time while loading is going on. The order in which are added is undefined and may change in between runs.
Passed: a <GtkDirectoryList>.
Returned: a boolean.
#t if self is loading
Creates a new <GtkDirectoryList>.
The <GtkDirectoryList> is querying the given
file with the given attributes.
Passed, or left out: a string, or #f.
The attributes to query with
Passed, or left out: a <GFile>, or #f.
The file to query
Returned: a <GtkDirectoryList>.
a new <GtkDirectoryList>
Sets the attributes to be enumerated and starts the enumeration.
If attributes is #f, the list of file infos will still be
created, it will just not contain any extra attributes.
Passed: a <GtkDirectoryList>.
Passed, or left out: a string, or #f.
the attributes to enumerate
Sets the file to be enumerated and starts the enumeration.
If file is #f, the result will be an empty list.
Passed: a <GtkDirectoryList>.
Passed, or left out: a <GFile>, or #f.
the <GFile> to be enumerated
Sets the IO priority to use while loading directories.
Setting the priority while self is loading will reprioritize the ongoing load as soon as possible.
The default IO priority is G_PRIORITY_DEFAULT, which is higher
than the GTK redraw priority. If you are loading a lot of directories
in parallel, lowering it to something like
G_PRIORITY_DEFAULT_IDLE may increase responsiveness.
Passed: a <GtkDirectoryList>.
Passed: a 32-bit integer.
IO priority to use
Sets whether the directory list will monitor the directory for changes.
If monitoring is enabled, the ::items-changed signal will be emitted when the directory contents change.
When monitoring is turned on after the initial creation of the directory list, the directory is reloaded to avoid missing files that appeared between the initial loading and when monitoring was turned on.
Passed: a <GtkDirectoryList>.
Passed: a boolean.
#t to monitor the directory for changes