docs-maui icon indicating copy to clipboard operation
docs-maui copied to clipboard

Clarity on the where to store user data files

Open rogersm-uwosh opened this issue 2 years ago • 5 comments

The documentation explains that the App data directory is "To get the app's top-level directory for any files that aren't user data files. These files are backed up with the operating system syncing framework."

I realize that most of the people reading this documentation are long-time Xamarin.forms users, and probably understand exactly what the previous sentence means, but it begs the question -- where should user data files be stored? The cache directory is temporary, so we can't use that; and bundled files are read-only.

After much Googling, it turns out that the App data directory is for iCloud and whatever Google Drive (?) files, so permission is an issue.

After more Googling, and reading over the Notes tutorial, I was able to discover this:

Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)

But it would be nice if the docs spelled this out clearly, or at least mentioned it.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

rogersm-uwosh avatar Sep 27 '22 00:09 rogersm-uwosh