WinJS共享目标,具有对文件的写访问权限

时间:2013-04-27 15:39:27

标签: windows-8 windows-runtime winjs

我的应用程序充当任何文件的共享目标。 我通过以下方式读取了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)该文件是只读的。

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

我在网上搜索,但无法找到任何答案,甚至包括写作的例子。

0 个答案:

没有答案
相关问题