Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function update(path, code)
- local site = http.get("http://pastebin.com/raw.php?i="..code)
- local siteInfo = site.readAll()
- site.close()
- local file = fs.open(path, "r")
- local fileInfo = file.readAll()
- file.close()
- if siteInfo ~= fileInfo then
- local fileWrite = fs.open(path, "w")
- fileWrite.write(siteInfo)
- fileWrite.close()
- return true
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment