fixed a missing parenthesis, added baseline non encrypted tables from tadb, added function for loading tables from file without kv or encryption
This commit is contained in:
@@ -422,6 +422,12 @@ end
|
||||
return table.fromstring(string.decode(string.loadkvfile(path), SERVER_KEY))
|
||||
end
|
||||
|
||||
-- Should read a lua table string from a file and return the table again, we'll see when it's tested
|
||||
function table.fromfile(path)
|
||||
local file = io.open(path, "r")
|
||||
return table.fromstring(file:read("a"))
|
||||
end
|
||||
|
||||
-- 获取表中值元素的长度,不计nil
|
||||
function table.count(t)
|
||||
if type(t) ~= "table" then
|
||||
|
||||
Reference in New Issue
Block a user