DataPackageView.GetStorageItemsAsync DataPackageView.GetStorageItemsAsync DataPackageView.GetStorageItemsAsync DataPackageView.GetStorageItemsAsync DataPackageView.GetStorageItemsAsync Method

Definition

Gets the files and folders stored in a DataPackageView object.

public : IAsyncOperation<IVectorView<IStorageItem>> GetStorageItemsAsync()
IAsyncOperation<IVectorView<IStorageItem>> GetStorageItemsAsync() const;
public IAsyncOperation<IReadOnlyList<IStorageItem>> GetStorageItemsAsync()
Public Function GetStorageItemsAsync() As IAsyncOperation<IReadOnlyList<IStorageItem>>(Of IVectorView)
Windows.ApplicationModel.DataTransfer.DataPackageView.getStorageItemsAsync().done( /* Your success and error handlers */ );

Returns

IAsyncOperation<IReadOnlyList<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>>

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();
}