Provides access to lists that an app can use to track recently accessed files and/or locations or to store files and/or locations to access in the future.
Syntax
Public NotInheritable Class StorageApplicationPermissions Inherits Object
Attributes
- StaticAttribute(Windows.Storage.AccessCache.IStorageApplicationPermissionsStatics, NTDDI_WIN8)
- VersionAttribute(NTDDI_WIN8)
Members
The StorageApplicationPermissions class has these types of members:
Methods
The StorageApplicationPermissions class inherits methods from the Object class (C#/VB/C++).
Properties
The StorageApplicationPermissions class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets an object that represents a list that an app maintains so that the app can store files and/or locations (like folders) and easily access these items in the future. | |
| Read-only | Gets an object that represents a list that an app can use to track the files and/or locations (like folders) that the app has accessed most recently. |
Remarks
Access the methods and properties of this class statically.
To see more code examples, see the File picker sample and the File access sample.
To learn about using the FutureAccessList and MostRecentlyUsedList, see How to track recently used files and folders.
To learn about what files and locations your app has permission to access, see File access and permissions in Windows Store apps.
Examples
This example demonstrates how to add an item to the app's FutureAccessList and MostRecentlyUsedList.
We recommend that you store the tokens that are returned by StorageApplicationPermissions.MostRecentlyUsedList.Add and StorageApplicationPermissions.FutureAccessList.Add so that you can use them to retrieve the respective list entry for the item that you added. In the example, we store the tokens in mruToken and faToken respectively but we don't do anything else with them.
Additionally, the savePicker variable in the example contains a FileSavePicker object that was created by the sample. To learn more about saving files with file pickers, see How to save files through file pickers. To learn about accessing files, see Quickstart: Accessing files with file pickers.
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
Build date: 12/4/2012