Forum Xamarin.Android

How to Create Folder in Xamarin.Android

Luis_dmLuis_dm USMember ✭✭✭

How to Create Folder in Xamarin.Android ?? help me

xamarin.android

Answers

  • rr2d2rr2d2 USMember ✭✭

    What do you mean create a folder ? like create a folder on the android device? or in and Xamarin Android project?

  • Luis_dmLuis_dm USMember ✭✭✭

    on the android device

  • leninmathileninmathi USMember ✭✭

    go through this below link...
    https://components.xamarin.com/view/pclstorage

  • rr2d2rr2d2 USMember ✭✭

    You need the following permissions

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    

    Then in your code when you want to create a folder just do the following

    Var pathToNewFolder = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/FolderName";
    Directory.CreateDirectory(pathToNewFolder);
    
Sign In or Register to comment.