The ListFolder method returns a list of all files and folders in a given folder.
The filter parameter is an can be used to specify a filter pattern. For example to find only mp3 files, you would specify “.mp3” as a filter
The You can also optionally sort the list in alphabetica order with the “alphasort” option.
See Also: WalkFolder, IsFolder, CreateList
Example - List home directory
function OnStart()
{
var list = app.ListFolder( "/sdcard/" );
ldg = app.CreateListDialog( "/sdcard/*", list );
ldg.Show();
}
Example - List .jpg assets
function OnStart()
{
var list = app.ListFolder( "/Sys/Img", ".jpg" );
ldg = app.CreateListDialog( "/Sys/Img/*.jpg", list );
ldg.Show();
}