Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tape
- if peripheral then
- tape = peripheral.find("tape_drive")
- else
- local component = require("component")
- tape = component.tape_drive
- end
- local tArgs = {...}
- if not tArgs[1] then error("Missing argument 1") end
- local file = io.open(tArgs[1], "rb")
- if not file then error("File doesn't exist") end
- local byte = file:read()
- while byte ~= nil do
- tape.write(byte)
- byte = file:read()
- end
Add Comment
Please, Sign In to add comment