Advertisement
antonsavov

Untitled

Mar 6th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. os.loadAPI('json')
  2.  
  3. -- see if the file exists
  4. function file_exists(file)
  5. local f = fs.open(file, "rb")
  6. if f then f:close() end
  7. return f ~= nil
  8. end
  9.  
  10. fs.makeDir("/records")
  11. local filename = "/records/_buildzones-list.yaml"
  12. print(file_exists(filename))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement