SHOW:
|
|
- or go back to the newest paste.
| 1 | rednet.open("top")
| |
| 2 | --HASH MUST MATCH RECEIVER HASH, OTHERWISE FILES WILL FAIL TO SEND | |
| 3 | hash = "HASH" | |
| 4 | tArgs = {...}
| |
| 5 | id = tonumber(tArgs[1]) | |
| 6 | ||
| 7 | if fs.exists(tArgs[2]) then | |
| 8 | term.clear() | |
| 9 | term.setCursorPos(1,1) | |
| 10 | textutils.slowPrint("Sending File "..tArgs[2].."...")
| |
| 11 | rednet.send(id, hash) | |
| 12 | rednet.send(id, tArgs[2]) | |
| 13 | file = fs.open(tArgs[2], "r") | |
| 14 | rednet.send(id, file.readAll()) | |
| 15 | else | |
| 16 | print(tArgs[2].." does not exist.") | |
| 17 | end |