What I am trying to do it have the end goal of:
{
[ "test" ] = "hi",
[ "foo" ] = "bar",
}
I have 2 files, file1 and file 2
file1:
[ "test" ] = "hi",
file2:
[ "foo" ] = "bar",
The code I have:
local cDir = fs.combine(dir, 'temp')
local start = "{\n"
local commandList = fs.list(cDir)
for k, v in pairs(commandList) do
local h = fs.open(fs.combine(cDir, v), 'r')
local contents = h.readAll()
h.close()
start = start .. contents
end
start = start .. "\n}"
local end = textutils.unserialize(start)
Apparently the above does not want to work for me, so is there any other way to do this?
Thanks












