Android Question Listing files of a file type? [SOLVED]

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

Embarrassingly simple question: I thought that the code below would load the list FileListing1 with only files with a png extension. For some reason it lists all files in dir ABT.
Can someone please tell what stupid thing I have missed?

Requires clsFileList.bas

B4X:
       Private FileLists As clsFilesLists
       Private FileListing1 as List
       FileListing1.Clear
       FileListing1 = FileLists.ListFiles(File.DirRootExternal & "/ABT/", "*.png", True, True)

Regards Roger
 

DonManfred

Expert
Licensed User
Longtime User
Search for Class wildcard
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

Problem solved by using MFLib LINK there appears to be a problem with clsFileList.bas

The following code worked as it should, thanks to Manfred Fuchs for a great library.

B4X:
Private MF_File As MF_File   'Sub Process_Globals

FileListing1.Clear
FileListing1 = MF_File.ListFiles(File.DirRootExternal & "/ABT/", "*.png", True, False)

Regards Roger
 
Last edited:
Upvote 0
Top