disk.hasData

From ComputerCraft Wiki
Revision as of 07:02, 4 August 2020 by Magiczocker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function disk.hasData
Checks whether the current disk is a floppy disk, as opposed to a music disc or other item.
Syntax disk.hasData(string side)
Returns boolean whether the item is a floppy
Part of ComputerCraft
API disk

Examples

Grid paper.png  Example
Checks for what is in the bottom drive
Code
print(disk.hasData("bottom"))
Output true if the item is a floppy, otherwise false