0

我的应用程序充当任何文件的共享目标。我可以通过以下方式读取Windows.Storage.StorageFile对象实例的权限:

    if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.storageItems)) {
        shareOperation.data.getStorageItemsAsync().then(function (storageItems) {
            for (var i = 0; i < storageItems.size; i++) {
                var storageFile = storageItems.getAt(i);
                // storageFile is of type Windows.Storage.StorageFile
            }
        });
    }

但是当我想写入文件时,我得到一个异常(0x80071779),该文件是只读的。

有没有办法获得对通过共享合同收到的文件的写访问权限(包括删除权限)?

我在网上搜索,但找不到任何答案,甚至找不到包含 write 的示例。

4

0 回答 0