I am using FutureAccessList with a FolderPicker so that I don't have to keep asking the User permission to access a folder. However, I am unsure of how to 'save' this Token, or save the result. If the User says "OK", you can access "this" folder, how will my application know that the next time it starts?

What do I need to save, where and how do I save it, and how do I check against it in the future? This question is related to my other question, and the solution I provided only partially works. It gets permission, but I am unsure how to keep that permission to check against it in the future.

有帮助吗?

解决方案

FutureAccessList token is just a string. You can store it in database, text file, in ApplicationData.LocalSettings, etc. Later you can read that token and submit in FutureAccessList.GetFileAsync to get access to user's file.

You can also find out what is in the list using StorageItemAccessList.Entries. this is a collection of the things you've added.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top