File And Folder Locations

App Data

Private data that an app reads and writes.  Normally not directly exposed to users, and one app cannot view app data from another app.

When an app is uninstalled all of its app data automatically gets deleted as well.

There are two types:

app settings

Access available via the Windows.Storage.ApplicationData class.

Small, primitive values that are easy to store and retrieve.

app files

Access available via the Windows.Storage.ApplicationData class.

Regular files on the local file system but in a private location specific to your app. You can interact with app files without needing any capabilities.  

Security data (e.g. usernames and passwords)

Use PasswordVault for a secure srotage similar to app data but with security.  Even better, use WebAuthenticationBroker if you can.

Files That Were Packaged With Your App

	Windows.Storage.StorageFolder folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
	Windows.Storage.StorageFile file = await folder.GetFileAsync("Assets\\SomeFile.txt");

Accessing Other Files

UWP applications can only use the KnownFolders for storage, no access is allowed to the wider core file system.

An exception to this is directories and files which the user manually selects with the FileOpenPicker or FolderPicker.

Accessing USB drive files

See here



We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.