Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dLoader = {
- ["setPath"] = function(_f, _r)
- if _f == "pwPath" then
- _fp = ".passwordField./auth/pwpath./password"
- else
- _fp = _f
- end
- file = fs.open(_f, _r)
- end,
- ["getData"] = function(_ch)
- if _ch == "line" then
- return file.readLine()
- file.close()
- elseif _ch == "lines" then
- tLines = {}
- sLine = file.readLine()
- while sLine do
- table.insert(tLines, sLine)
- sLine = file.readLine()
- end
- file.close()
- elseif _ch == "all" then
- return file.readAll()
- file.close()
- end
- end,
- ["setData"] = function(_ch, _c)
- if type(_ch) == "table" then
- for i=1, _ch do
- file.writeLine(_ch[i])
- end
- elseif type(_ch) == "function" then
- return
- else
- file.writeLine(_ch)
- end
- if _c == true then
- file.close()
- end
- end,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement