I can currently read and write to a root directory on a SDCard using the ExternalStorage class (v1.02) on Android 9. My question is, how do I create directories under the root directory?
File structure:
SDCard/
____RootDir/ << Can read and write here
________NewDir/ << How to create this level?
____________NewDir2/ << Would ultimately like to create this one as well
'Creates a new directory
Public Sub FindDirOrCreate(Parent As ExternalFile, Name As String) As ExternalFile
Dim f As ExternalFile = FindFile(Parent, Name)
If f.IsInitialized = False Then
Return DocumentFileToExternalFile(Parent.Native.RunMethod("createDirectory", Array(Name)))
Else
Return f
End If
End Sub