Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function readFile(path,table)
- local index = 1
- h = fs.open(path,"r")
- l = h.readLine()
- while (l ~= nil) do
- l = h.readLine()
- table[index] = l
- index = index + 1
- end
- h.close()
- h = fs.open(path,"r")
- table["content"] = h.readAll()
- h.close()
- end
- function loadFiles(table,...)
- for i=1,#arg do
- table[i] = {}
- file2table.readFile(arg[i],table[i])
- end
- end
Add Comment
Please, Sign In to add comment