disk.getLabel

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  Function disk.getLabel
Reads the label from the disk in the drive. This is the label that shows up in the item tooltip (for both floppy disks and music records). For floppy disks, the label can be set with disk.setLabel.
Syntax disk.getLabel(string side)
Returns string disk label, or nil if the item in the drive is neither a floppy disk nor a music record or if it is a floppy disk with no label
Part of ComputerCraft
API disk

Examples

Grid paper.png  Example
Checks for data saved on the disk in the bottom drive
Code
print(disk.getLabel("bottom"))
Output Floppy --Output changes according to the disk label
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox