docs-maui
docs-maui copied to clipboard
Clarity on the where to store user data files
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.
- ID: 5b7e12aa-3c09-0f82-2fa2-a39c2c8065d8
- Version Independent ID: 5b7e12aa-3c09-0f82-2fa2-a39c2c8065d8
- Content: File system helpers - .NET MAUI
- Content Source: docs/platform-integration/storage/file-system-helpers.md
- Product: dotnet-mobile
- Technology: dotnet-maui
- GitHub Login: @davidbritch
- Microsoft Alias: dabritch