Difference between revisions of "Disk.hasData"

From ComputerCraft Wiki
Jump to: navigation, search
(Bug - not working for empty disks)
Line 14: Line 14:
 
}}
 
}}
  
dd
+
== Bugs ==
 +
Returns "true" for new and empty disks.

Revision as of 07:18, 11 June 2012


Grid Redstone.png  Function disk.hasData
No description provided.
Syntax disk.hasData(string side)
Returns boolean whether the disk has data
Part of ComputerCraft
API disk

Examples

Grid paper.png  Example
Checks for data saved on the disk in the bottom drive
Code
print(disk.hasData("bottom"))
Output true if the disk has saved data, otherwise false


Bugs

Returns "true" for new and empty disks.