Download folder Access, subfolders creation in Xamarin.Forms 3.4.0.1029999

Hi folks,

I try to use this piece of code in Xamarin.Forms NET.Standard code sharing project but raises a Denied exception. Why? How can I create subfolders in Download folder (this is a mandatory app requeriment)?

Cheers

netstandard2.0
string root = "/storage/emulated/0/Download/";

if (Directory.Exists(root + "Test1") == false)
Directory.CreateDirectory(root + "Test1");

System.UnauthorizedAccessException: Access to the path "/storage/emulated/0/Download/Test1" is denied.

Android project





Sign In or Register to comment.