Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local fs = require("filesystem")
- local term = require("term")
- local textsss = "0"
- if fs.exists("/data/usr/programs/wheee.txt") then
- term.write("file exists \n")
- else
- term.write("file does not exist you butt \n")
- end
- --Example
- file = fs.open("/data/usr/programs/wheee.txt",'w')--Arg 1 - file name / path Arg 2 option (r/w/a)
- file:write("Blah")
- textsss = file:read(4)
- file:close()
- term.write(tostring(textsss))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement