I have a String Array that I am creating as follows:
I wish to now create this Array "on-the-fly" by reading the files within the folder.
I can create a List of files, as follows:
The Log is:
How do I create the Array for:
B4X:
Dim booknames() As String = Array As String("text_creative_arts.epub", _
"text_english_reader.epub", _
"text_Life_Orientation.epub", _
"text_mathematics.epub")
I wish to now create this Array "on-the-fly" by reading the files within the folder.
I can create a List of files, as follows:
B4X:
Dim ImageList As List
Dim ImageCount As Int
ImageList = File.ListFiles("/storage/emulated/0/books/Text/")
ImageCount = ImageList.Size
Log("File List = " & ImageList)
Log("File Count = " & ImageCount)
B4X:
File List = (ArrayList) [text_creative_arts.epub, text_english_reader.epub, text_Life_Orientation.epub, text_mathematics.epub]
File Count = 4
B4X:
Dim booknames() As String = Array As String()