Dim found as List
. . .
Private Sub findFiles
found.Initialize
rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult(Permission As String, Result As Boolean)
If (Permission = rp.PERMISSION_READ_EXTERNAL_STORAGE) Then
findFiles(File.DirRootExternal, ".OXS", found)
End If
End Sub
Sub findFiles(path As String, extn As String, result As List)
Dim files As List = File.ListFiles(path)
If (files.IsInitialized) Then
For Each f As String In files
If (File.IsDirectory(path, f)) Then
findFiles(path & "/" & f, extn, result)
Else
If (f.EndsWith(extn)) Then
result.Add(path.Replace(File.DirRootExternal, "") & "/" & f)
End If
End If
Next
End If
End Sub