disk event

From ComputerCraft
Jump to: navigation, search
disk
Event
Returns

Source CC:Tweaked

Occurs every time a disk is inserted into a connected Disk Drive.

ExampleExampleAlerts on disk insertion
Waits for a disk to be inserted and alerts the user when it occured.
Code
local event, peripheral_name = os.pullEvent("disk")
print("A disk has been inserted into disk drive", peripheral_name)