disk.getID

Returns the ID of the disk drive attached at the specified side or network name. Returns nil if there is no disk drive attached at the specified side or network name or there is no disk in the disk drive.

ExampleGet disk ID
Gets and prints the ID of the disk inserted in the disk drive on the top.
Code
print(disk.getID("top"))
Output If a disk drive is attached on the top, it would return the disk's ID.

disk.getID
Function
Syntax
disk.getID(
  • side or network name : string
)

Returns number ID
API disk
Source CC:Tweaked (source)
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.