Difference between revisions of "Disk (API)"

From ComputerCraft Wiki
Jump to: navigation, search
Line 1: Line 1:
 
The Disk API allows you to mess around with disk drives.
 
The Disk API allows you to mess around with disk drives.
  
Its functions include:
+
{| border="1" cellpadding="2" cellspacing="0"
* disk.isPresent( side ) which checks for a disk
+
!style="background:#EEE" width="200px"|Method name
* disk.hasData( side) which checks if the disk is not blank
+
!style="background:#EEE" width="*"|Description
* disk.getMountPath( side )
+
|-
* disk.setLabel( side ) which sets the label
+
|disk.isPresent( side )
* disk.getLabel( side ) which gets the label
+
|Checks the given side for a disk
* disk.hasAudio( side ) which checks if it is a music disk
+
|-
* disk.playAudio( side ) which plays the audio
+
|disk.hasData( side )
* disk.stopAudio( side ) which stops the audio
+
|Checks the disk for data
* disk.eject( side ) which ejects the disk.
+
|-
 +
|disk.getMountPath( side )
 +
|<no description given>
 +
|-
 +
|disk.setLabel( side )
 +
|Sets the label
 +
|-
 +
|disk.getLabel( side )
 +
|Finds label
 +
|-
 +
|disk.hasAudio( side )
 +
|Checks if the disk is a music disk
 +
|-
 +
|disk.playAudio( side )
 +
|Plays the audio
 +
|-
 +
|disk.stopAudio( side )
 +
|Stops the audio
 +
|-
 +
|disk.eject( side )
 +
|Ejects the disk.
 +
|}
 
[[Category:APIs]]
 
[[Category:APIs]]

Revision as of 05:36, 31 January 2012

The Disk API allows you to mess around with disk drives.

Method name Description
disk.isPresent( side ) Checks the given side for a disk
disk.hasData( side ) Checks the disk for data
disk.getMountPath( side ) <no description given>
disk.setLabel( side ) Sets the label
disk.getLabel( side ) Finds label
disk.hasAudio( side ) Checks if the disk is a music disk
disk.playAudio( side ) Plays the audio
disk.stopAudio( side ) Stops the audio
disk.eject( side ) Ejects the disk.