Access files, folders, and data from your Windows Store app.
File access through file pickers
File pickers give users explicit control over which files and folders your app can access, and give you an easy way to let users specify the name or location of a file to save. Call the file picker to let your users choose the files and folders that they want your app to work with. (And when the user gives your app access to a folder through the file picker, your app also gets access to that folder and all of its subfolders.)
If your app works with individual files or small lists of files, like most apps, these file picker interactions may be all you need to access files and folders for your app. If you don't need additional file system access, you can minimize your app's capability declarations and potentially simplify the review process when you submit your app to the Windows Store. See File access and permissions in Windows Store apps to learn more about default file system permissions and the file picker.
For example, in this screen shot an email app called the file picker so that the user could choose a picture from the Pictures library.

And in this screen shot the Reader app called the file picker so that the user could specify the file name and location of the file to save.

Programmatic access to files
- Get started:
If your app has permission to access files and folders in a particular location, you can enumerate and access all the files in that location. See File access and permissions in Windows Store apps to learn which locations your app has access to automatically, and learn about ways your app can gain access to additional locations.
Access to app files and data
All apps can store and manage app-specific files and data on the local file system or the cloud, including resource files in the app package.
Read or write file data
- Get started:
You can read and write data to a file directly or by using streams.
In this section
| Topic | Description |
|---|---|
|
Access files and folders through the file picker by letting users pick files and folders. You can use the FileOpenPicker class to gain access to files and the FolderPicker to gain access to folders. | |
|
Access files and folders that are in a location like a folder, library, device, or network location. You can also query the files and folders in a location by constructing file and folder queries. | |
|
Read and write a file using a StorageFile object. | |
|
Access content stored in the user's HomeGroup folder, including pictures, music, and videos. | |
|
Use FileSavePicker to let users specify the name and location where they want to save your app’s content. | |
|
Track files that your user accesses frequently by adding them to your app's most recently used list. Windows manages the MostRecentlyUsedList for you by sorting items based on when they were last accessed, and by removing the oldest item when the list's 25-item limit is reached. All Windows Store apps have their own MostRecentlyUsedList. |
Related topics
Build date: 11/29/2012