function link_dir (dir, base) local path = base.."/"..dir local mode = lfs.attributes (path).mode if mode == "directory" then return string.format ('%s', cgilua.mkurlpath ("test_fs.lua", { dir = path }), dir) else return dir end end cgilua.htmlheader () cgilua.put ("
Testing dir | |
"..i.." | "..link_dir(file, dir).." |