Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataPackageView.GetStorageItemsAsync | getStorageItemsAsync method

Applies to Windows and Windows Phone

Gets the files and folders stored in a DataPackageView object.

Syntax


dataPackageView.getStorageItemsAsync().done( /* Your success and error handlers */ );

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<IVectorView>

An array of files and folders stored in a DataPackageView.

Examples


if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.storageItems)) {
    shareOperation.reportStarted();
    shareOperation.data.getStorageItemsAsync().then(function (storageItems) {
        var fileList = "";
        for (var i = 0; i < storageItems.size; i++) {
            fileList += storageItems.getAt(i).name;
            if (i < storageItems.size - 1) {
                fileList += ", ";
            }
        }
        filesDiv = document.createElement("div");
        filesDiv.innerText = fileList;
        document.body.appendChild(filesDiv);
    });
    shareOperation.reportCompleted();
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.ApplicationModel.DataTransfer
Windows::ApplicationModel::DataTransfer [C++]

Metadata

Windows.winmd

See also

DataPackageView

 

 

Show:
© 2015 Microsoft