摘要: require "io"require "lfs"------------------------------------------------------------------------------------It will return a table that contents all the file paths in the rootpathfunction getpathes(rootpath, pathes) pathes = pathes or {} for entry in lfs.dir(rootpath) do if entr 阅读全文
posted @ 2012-05-10 17:33 MeT 阅读(7688) 评论(1) 推荐(2)
摘要: 1 function SetReadOnlyVariables(tbTarget, tbVariablesInTable) 2 local proxy = {} 3 local mt = { 4 __index = tbTarget, 5 __newindex = function(_, k, v) 6 if tbVariablesInTable[k] then 7 error("attempt to update a read-only table", 2) 8 ... 阅读全文
posted @ 2012-05-10 16:59 MeT 阅读(1169) 评论(0) 推荐(1)