Skip To Content ArcGIS for Developers Sign In Dashboard

PortalFolderListModel QML Type

Represents the folders in the root folder of a user. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.0

Properties

Signals

Methods

Detailed Description

Folders are used to organize content in a portal. The list of PortalFolder objects is retrieved by calling fetchContent and if the operation is succesful, this model is returned by the portalUser's folders method.

The model returns data for the following roles:

RoleTypeDescription
createdQDateTimeThe date the folder was created.
folderIdQStringThe id of the folder.
titleQStringThe title of the folder.

Example:

Retrieve the model representing a user's folders:

Connections {
    target: portalUser
    onFetchContentStatusChanged: {
        if (portalUser.fetchContentStatus !== Enums.TaskStatusCompleted)
            return;

        console.log("folders count = ", portalUser.folders.count);
    }
}
portalUser.fetchContent();

See also PortalUser and PortalFolder.

Property Documentation

count : int

Returns the number of objects in the model (read-only).


error : Error

Returns the Error object (read-only).


Signal Documentation

countChanged()

Emitted when the count property of the model changes.

Note: The corresponding handler is onCountChanged.


errorChanged()

Signal emitted when the error property changes, which can indicate that an error occurred.

Note: The corresponding handler is onErrorChanged.


portalFolderAdded(index)

Signal emitted when a folder is added to the list model.

index is the index of the added PortalFolder.

Note: The corresponding handler is onPortalFolderAdded.


portalFolderRemoved(index)

Signal emitted when a folder is removed from the list model.

index is the index of the removed PortalFolder.

Note: The corresponding handler is onPortalFolderRemoved.


Method Documentation

bool contains(portalFolder)

Returns true if the list model contains the specified PortalFolder portalFolder.


void forEach(callback)

Receives a callback function to execute for each portalFolder in the model.

The callback function can take 0 to 3 optional arguments, in order:

Returns undefined if no error occurred, and an error message otherwise.

var error = PortalFolderListModel.forEach(function(element, index, array) {
    ...
});
if (error) {
    console.error(error.message);
}

PortalFolder get(index)

Returns the PortalFolder at the specified index.


int indexOf(portalFolder)

Returns the index of a specific portal folder (portalFolder) from the list model.

This method was introduced in Esri::ArcGISRuntime 100.5..



Feedback on this topic?