Reputation: 2051
I'm planning to develop an application using Desktop Bridge. Data will be saved in a folder containing SQLite databases and other documents in subfolders.
I assume the data can be saved only inside the UWP application sandbox with restricted file permissions
As the data are valuable for the user, I need to find an easy way, before uninstall or update, to prompt him using a picker to save the data folder and the subfolders in his arbitrary selected location.
1.The user with a single action to pick its desired location-folder and then the software to copy the data folder-subfoders in the selected user's folder, which maybe is empty or it will override existing prior backup without warnings.
(not complicate like this SO answer MostRecentlyUsedList. I don't know also if it is possible to track an empty folder)
2.How to prompt user before the uninstall or update (in order to save the latest backup, (maybe in another location, whatever he wants).
This is the bigger problem I've in order to build my application.
Upvotes: 0
Views: 149
Reputation: 13850
Your first assumption is incorrect. As a desktop-bridge app you can save anywhere on the file system where the current user has write permissions. It's the same as for a regular Win32/Winforms/WPF app. The only difference is that writes to the global AppData folder are redirected to the app-specific AppData folder. Also note that you can't write to your own install folder.
See this paragraph:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-behind-the-scenes#file-system
"Writes to files and folders that are not part of the package are ignored by the bridge and are allowed as long as the user has permission."
Upvotes: 3