|Provides a list of all peripherals available.|
If a device is located directly next to the system, then its name will be listed as the side it is attached to. If a device is attached via a Wired Modem, then it'll be reported according to its name on the wired network.
|Returns||A numerically indexed table of all peripherals present.|
|Prints a list of all attached peripherals, along with their type (using peripheral.getType()).|
local periList = peripheral.getNames() for i = 1, #periList do print("I have a "..peripheral.getType(periList[i]).." attached as \""..periList[i].."\".") end
|Output||Depending on the peripherals available, along the lines of:
I have a modem attached as "left".