2
Create a list of scripts from the examples directory
3
and let the user select a script to open.
8
local dirsep = geany.dirsep
10
local examples=geany.appinfo().scriptdir..dirsep.."examples"
12
function listfiles(dir)
13
local stat=geany.stat(dir)
14
if not (stat and stat.type=="d")
16
geany.message("Can't open folder:\n"..dir)
19
for file in geany.dirlist(dir)
21
local path=dir..dirsep..file
25
listfiles(path) -- Recursive !
29
table.insert(filelist, path:sub(#examples+2))
41
geany.banner="Examples"
42
local file=geany.choose("Choose a script to open:", filelist)
45
geany.open(examples..dirsep..file)