0

I wonder how you (C#)programmatically create a folder in the Assets Folder in Android. My project is called App1 so the folder I want to create is named: "imagefolder1"

The full path look like this: App1/Assets/imagefolder1

How can we create "imagefolder1" here? (Notice that I want to have many image folders in the Assets Folder. Please tell if this is the wrong place to have them)

Cœur
  • 37,241
  • 25
  • 195
  • 267
Andreas
  • 1,121
  • 4
  • 17
  • 34

2 Answers2

0

I wonder how you (C#)programatically create a folder in the Assets Folder in Android

You cannot do this, in any programming language. Assets are not files on the device. They are packaged in the APK, and you cannot modify them, including creating directories.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
-1

var pathToNewFolder = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/Assets/imagefolder1";
            Directory.CreateDirectory(pathToNewFolder);
Andreas
  • 1,121
  • 4
  • 17
  • 34