disk event

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

ExampleAlerts on disk insertion
Waits for a disk to be inserted and alerts the user when it occured.
Code
<nowiki>
local event, peripheral_name = os.pullEvent("disk")
print("A disk has been inserted into disk drive", peripheral_name)
    </nowiki>
disk
Event
Returns
  • name : string The side or network name of the Disk Drive the disk got inserted into

Source CC:Tweaked
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.