With the upcoming release of Windows 10, Windows developers will get an access to Universal Windows Platform (UWP) that extends WinRT platform with new capabilities and UIs. Previously, I described several places on the local drive and external storages simply accessible by modern Windows apps. UWP apps inherit all that capabilities but also can be enhanced by utilizing new folders.

Publisher Cache Folder

From now, apps from the same publisher can share files between each other using ApplicationData.Current.GetPublisherCacheFolder. This folder shall not be used for critical data, as it is not backedup or roamed and at any moment can be cleared by the user. Before use, shared folder shall be registered in the app manifest. Files created in the cache stays there until at least one publisher app still installed.

Files are physically located in %user_folder%\AppData\Local\Publishers\%PublisherID%\%folder%

Local Cache Folder

Another folder, ApplicationData.Current.LocalCacheFolder, allows caching files locally, for particular app, without including them into backup or roaming operations. Files are physically located in %user_folder%\AppData\Local\Publishers\%ID%\LocalCache\

Bonus: Showing folder in File Explorer

New Windows.System.Launcher method - LaunchFolderAsync(IStorageFolder) – allows launching of File Explorer with the content of the provided folder. Overloaded version of LaunchFolderAsync accepts second parameter which let developers to control Explorer’s display options.

Universal Windows Platform includes multiple new and improved UI controls - you can join Canadian Dev Connection blog to learn more. Also, don’t forget to join Windows 10 release celebration at a Microsoft Store near you!

blog comments powered by Disqus