将项目移动到 FutureAccessList 的顶部

Moving items to the top of the FutureAccessList

我正在使用 StorageApplicationPermissions.FutureAccessList 在我的应用程序中存储文件和文件夹的访问令牌。首次启动应用程序时,用户可以选择 "documents" 默认存储项目的文件夹。对该文件夹的访问权限存储在 FutureAccessList

此列表最多包含 1000 个项目。据我了解,一旦第 1000 个项目添加到列表中,第一个项目就会被删除。

如何将项目移至 FutureAccessList 的顶部以使其永远不会失去访问权限?

这表示on the MSDN page:

Unlike the MRU, the platform does not manage the futureAccessList for you. When you reach the 1000 item limit, you must remove an item from the list before adding another one. You can do this by using the remove method.

基本上,项目不会从此列表中删除,除非您自己删除。因此,无需移动列表顶部的任何内容,您只需要注意要删除的项目(如果需要)。