Commit graph

5 commits

Author SHA1 Message Date
William Wilgus
49600dd77c filebrowse.lua add sort by type, add .bmp, .mod to known filetypes
also extends date and size examples to show the size and timestamp
respectively

Change-Id: Ife2b74a8a60a6da097f1f714ebaf68a60d504287
2026-08-07 09:05:59 -04:00
William Wilgus
3ad3fba68e filebrowse.lua don't display parent path for files
when browsing the filename gets cut off due to the
length of the parent path

Instead strip the parent from the beginning for files

Change-Id: Ib9dadffabced89b5895420cb696227ca8cc444a2
2026-07-17 10:54:38 -04:00
William Wilgus
ca7399821f FS#13953 - lua add get_files() to its own module
get_files(path, recurse, finddir, findfile, sort_by, cancel_fn, f_t, d_t)

get_files returns a sorted tables of directories and (another) of files

path is the starting path; recurse == false.. only that path will be searched

findfile & finddir are definable search functions
 if not defined all files/dirs are returned if false is passed.. none
  or you can provide your own function

sort_by can be by "name" "size" "date" or "none" to perform no sorting
 note: for "size" and "date" you may need to strip the attribute data to use
 the returned filename

cancel_fn if not defined or not a function no user cancel otherwise supply
    your own cancel function which returns true to cancel searching for files

f_t and d_t allow you to pass your own tables for re-use but isn't necessary

Change-Id: Ic4c2ad9c9b5abeeeeaf572880edbc8873d52066b
2026-07-09 12:45:05 -04:00
Solomon Peachy
d54b9e6f8d chore: Get rid of *all* vestigal CVS '$Id:$' tags
Change-Id: I35c13a9768c582e4851aa252dd3ea5c89f760c8c
2026-06-01 16:01:18 -04:00
William Wilgus
d7c541742f Allow first level folders in plugin menu
add sorting directories as files
move picross files to a hidden folder

use directory for lua_scripts, sgt_puzzles

make plugin browser able to handle 1st level directories

Change-Id: I30852d71dc992c378d5790756e94f06f5a2e9bef
2024-05-05 14:01:43 -04:00