Android Question Read the directory names

anallie0

Active Member
Licensed User
Longtime User
hi
There is a way to read the directory names to put them in a list.
For example, similar to
B4X:
File.ListFiles (File.DirRootExternal)

thanks
 

eurojam

Well-Known Member
Licensed User
Longtime User
B4X:
   Dim l As List
    Dim l2 As List
    l2.Initialize
    l = File.ListFiles (File.DirRootExternal)
    For i=0 To l.Size-1
      If File.IsDirectory(File.DirRootExternal, l.Get(i)) Then
         l2.Add(l.Get(i))
         Log(l.Get(i))
      End If
    Next
    Log(l2.Size)
 
Upvote 0
Top