Advertisement
Matdupy

Untitled

Aug 13th, 2021
1,145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. function open_bdd(path)
  2.     local file = fs.open(path, 'r')
  3.     local content = file.readAll()
  4.     file.close()
  5.     return textutils.unserialiseJSON(content)
  6. end
  7.  
  8. function save_bdd(bdd, path)
  9.     local file = fs.open(path, 'w')
  10.     local content = textutils.serialiseJSON(bdd)
  11.     file.write(content)
  12.     file.close()
  13. end
  14.  
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement