disk.isPresent

From ComputerCraft
Jump to: navigation, search

disk.isPresent
Function
Syntax
disk.isPresent(
  • side or network name : string
)

Returns boolean result
API disk
Source CC:Tweaked (source)

Checks if an item is inside of a disk drive at the specified side or network name. Returns true if an item is inside the disk drive or false if an item isn't inside the disk drive.

ExampleExampleIs there an item?
Gets and prints whether an item is in the disk drive on the top side.
Code
print(disk.isPresent("top"))
Output If an item was attached to the top drive it'd output true, otherwise it would output false.