disk.hasData

From ComputerCraft Wiki
Revision as of 18:28, 21 April 2013 by Hawk777 (Talk | contribs) (This does not check whether there is anything on the disk, rather what type of item is in the drive)

Jump to: navigation, search


Grid Redstone.png  Function disk.hasData
Checks whether the item in the drive is a Floppy Disk.
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