G GuyBooth Active Member Licensed User Longtime User May 30, 2018 #1 I have succeeded in accessing files and folders and creating a file using the ExternalStorage class at https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content I don't see a way to create a new folder. Do I need to use some variation of the CreateNewFile method? Or is there a method that can be added to the class?
I have succeeded in accessing files and folders and creating a file using the ExternalStorage class at https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content I don't see a way to create a new folder. Do I need to use some variation of the CreateNewFile method? Or is there a method that can be added to the class?
Erel B4X founder Staff member Licensed User Longtime User May 31, 2018 #2 Add this sub to the class: Code: Copy 'Creates a new directory Public Sub CreateNewDirectory (Parent As ExternalFile, Name As String) As ExternalFile Return DocumentFileToExternalFile(Parent.Native.RunMethod("createDirectory", Array(Name))) End Sub I haven't tested it. Upvote 0
Add this sub to the class: Code: Copy 'Creates a new directory Public Sub CreateNewDirectory (Parent As ExternalFile, Name As String) As ExternalFile Return DocumentFileToExternalFile(Parent.Native.RunMethod("createDirectory", Array(Name))) End Sub I haven't tested it.
G GuyBooth Active Member Licensed User Longtime User May 31, 2018 #3 Erel said: Add this sub to the class: Code: Copy 'Creates a new directory Public Sub CreateNewDirectory (Parent As ExternalFile, Name As String) As ExternalFile Return DocumentFileToExternalFile(Parent.Native.RunMethod("createDirectory", Array(Name))) End Sub I haven't tested it. Click to expand... It works Upvote 0
Erel said: Add this sub to the class: Code: Copy 'Creates a new directory Public Sub CreateNewDirectory (Parent As ExternalFile, Name As String) As ExternalFile Return DocumentFileToExternalFile(Parent.Native.RunMethod("createDirectory", Array(Name))) End Sub I haven't tested it. Click to expand... It works