Advertisement
Guest User

Untitled

a guest
May 19th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. local fs = require("filesystem")
  2. local term = require("term")
  3. local textsss = "0"
  4. if fs.exists("/data/usr/programs/wheee.txt") then
  5. term.write("file exists \n")
  6. else
  7. term.write("file does not exist you butt \n")
  8. end
  9. --Example
  10. file = fs.open("/data/usr/programs/wheee.txt",'w')--Arg 1 - file name / path Arg 2 option (r/w/a)
  11. file:write("Blah")
  12. textsss = file:read(4)
  13. file:close()
  14. term.write(tostring(textsss))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement