Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function read(path)
- local h = fs.open(path, "r")
- local line
- local relay = true
- local table = {path}
- local i = 2
- while relay do
- line = h.readLine()
- if line ~= nil then
- table[i] = line
- i = i + 1
- else relay = false
- end
- end
- h.close()
- return table
- end
- function string(table)
- local string = ""
- for i = 1, #table do
- string = string..table[i].."\n"
- end
- return string
- end
- function unstring(tempFileName, string)
- local name = ""
- local h = fs.open(tempFileName, "w")
- local text = ""
- h.writeLine(string)
- h.close()
- local f = fs.open(tempFileName, "r")
- name = f.readLine()
- f.close()
- fs.delete(tempFileName)
- text = string.gsub(string, name.."\n", "")
- local d = fs.open(name, "w")
- d.writeLine(text)
- d.close()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement