Advertisement
KingKevin23

wget

Mar 14th, 2022
860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local args = {...}
  2. local url = args[1]
  3. local fileName = args[2]
  4. local response = http.get(url)
  5. local content = response.readAll()
  6. response.close()
  7. local path = shell.resolve(fileName)
  8. local file = fs.open(path, "w")
  9. file.write(content)
  10. file.close()
  11. print("Finished")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement