As the headline says, how to list only .txt files in a directory with B4J?
This is what I tried
But it lists also the directories. One idea might be to use File.IsDirectory but I dunno how to implement it.
This is what I tried
B4X:
Dim fl As List = File.ListFiles("c:\")
For j = 0 To fl.Size-1
Log(fl.Get(j))
ListView1.Items.Add(fl.Get(j))
Next
But it lists also the directories. One idea might be to use File.IsDirectory but I dunno how to implement it.