Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local Channel = args[1]
- if peripheral.find("modem") then
- modem = peripheral.find("modem")
- if type(tonumber(Channel)) == "number" then
- modem.open(tonumber(Channel))
- else
- return printError("Please Supply a Number (args[1])")
- end
- else
- return printError("Modem Required")
- end
- local dir = args[2]
- if not fs.isDir(dir) then
- term.clear()
- term.setCursorPos(1,1)
- print("Create Directory? Y/N")
- if string.lower(read()) == "y" then
- fs.makeDir(dir)
- else
- return printError("Please Supply a Valid Directory")
- end
- end
- local function readCon(file)
- local file = fs.open(file,"r")
- cont = file.readAll()
- file.close()
- return cont
- end
- local function waitForMessage()
- local evnt, side, chan, rChan, Data, dist = os.pullEvent("modem_message")
- local M = textutils.unserialise(Data)
- local Action = M.action
- if Action == "PULL" then
- end
- end
Add Comment
Please, Sign In to add comment