Difference between revisions of "Disk.hasData"
From ComputerCraft Wiki
(Take better description from function table on API page) |
m (Use type template) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=disk.hasData | |name=disk.hasData | ||
− | |args= | + | |args={{Type|string}} side |
|api=disk | |api=disk | ||
− | |returns= | + | |returns={{Type|boolean}} whether the item is a floppy |
|desc=Checks whether the current disk is a [[Floppy Disk|floppy disk]], as opposed to a [http://www.minecraftwiki.net/wiki/Music_Discs music disc] or other item. | |desc=Checks whether the current disk is a [[Floppy Disk|floppy disk]], as opposed to a [http://www.minecraftwiki.net/wiki/Music_Discs music disc] or other item. | ||
|addon=ComputerCraft | |addon=ComputerCraft |
Revision as of 19:12, 22 April 2013
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
Example | |
Checks for what is in the bottom drive | |
Code |
print(disk.hasData("bottom")) |
Output | true if the item is a floppy, otherwise false |