Sat, 12 Sep 2009 21:27:57 +0300
(don't know)
local hierarchy={} local function descend(hierarchy, dir) local loca=hierarchy string.gsub(dir, "([^/]+)", function(d) loca=hierarchy[d] assert(loca) end) return loca end -- Tai sit vaan jokainen dokumentti ilman extensiota. function get_shortcuts(dir) --local loca=descend(hierarchy, dir) return {} --append(loca, append(hierarchy, {})) end function get_environment(dir) return { location=dir, shortcuts=get_shortcuts(dir) } end