Advertisement
Prehistoricman

File IO

Sep 4th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.24 KB | None | 0 0
  1. dir = "D:\\Temporary\\Lua 5_1 Reference Manual_files\\"
  2. req = "logo.gif"
  3. file, err = io.open(dir..req)
  4. if err then
  5.     error(err)
  6.     return --this is in a function
  7. end
  8. print(#file:read("*a"))
  9. -- > 82
  10. --The file is http://prntscr.com/1pd4t6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement