Jump to navigation Jump to search
Returns the label of the disk inside the disk drive at the specified side or network name. Returns nil when no peripheral is attached at the specified side or network name or there is no disk inside the disk drive.
|Gets and prints the label of the disk inside the disk drive attached to the top side.|
|Output||If a disk drive was attached and a disk was inside, the output would be the label of the disk.|
|Checks whether the label of the disk inside the disk drive attached on the top side is a specified label, and then prints the result.|
local label = disk.getLabel("top") if label == "Testing" then print("Valid disk!") else print("Invalid disk.") end
|Output||If a disk drive was attached, a disk was inside and also the disk label was 'Testing', then it would return 'Valid disk!'|