local function FileMan_ListFILL() if current_path == '' then return end local folders = gui.files(current_path..'*', true) if not folders then return end local table_folders = {} for i, d in ipairs(folders) do table_folders[i] = {'['..d..']', {d,'d'}} end table.sort(table_folders, function(a, b) return a[1]:lower() < b[1]:lower() end) local files = gui.files(current_path..file_mask) local table_files = {} if files then for i, filename in ipairs(files) do table_files[i] = {filename, {filename}} end end table.sort(table_files, function(a, b) return a[1]:lower() < b[1]:lower() end) list_dir:clear() list_dir:add_item ('[..]', {'..','d'}) for i = 1, #table_folders do list_dir:add_item(table_folders[i][1], table_folders[i][2]) end for i = 1, #table_files do list_dir:add_item(table_files[i][1], table_files[i][2]) end list_dir:set_selected_item(0) FileMan_ShowPath() end |