DataPackageView.GetStorageItemsAsync メソッド

定義

DataPackageView オブジェクトに格納されているファイルとフォルダーを取得します。

public:
 virtual IAsyncOperation<IVectorView<IStorageItem ^> ^> ^ GetStorageItemsAsync() = GetStorageItemsAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<IStorageItem>> GetStorageItemsAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<IStorageItem>> GetStorageItemsAsync();
function getStorageItemsAsync()
Public Function GetStorageItemsAsync () As IAsyncOperation(Of IReadOnlyList(Of IStorageItem))

戻り値

DataPackageView に格納されているファイルとフォルダーの配列。

属性

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

適用対象