Fandom

The Tekkit Wiki

Disk API

874pages on
this wiki
Add New Page
Talk0 Share

This page is about the Disk API. If you were looking for information on the Floppy Disk, please go to Floppy Disk.

The Disk API allows you to experiment with disk drives. The methods for this API are listed below.

disk.isPresent

Function disk.isPresent
Syntax disk.isPresent(string side)
Returns boolean something is in the disk drive
Description No description provided.

Examples

Description Checks whether a disk is in the bottom disk drive or not
Code
print(disk.isPresent("bottom"))
Output true if there is a disk, otherwise false



disk.hasData

Function disk.hasData
Syntax disk.hasData(string side)
Returns boolean whether the disk has data
Description No description provided.

Examples

Description 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



disk.getMountPath

Function disk.getMountPath
Syntax disk.getMountPath(string side)
Returns string path
Description No description provided.

Examples

Description Finds the path of the bottom disk drive
Code
print(disk.getMountPath("bottom"))
Output disk



disk.setLabel

Function disk.setLabel
Syntax disk.setLabel(string side, string label)
Returns nil
Description No description provided.

Examples

Description Sets the label of the disk in the bottom drive to "Floppy"
Code
disk.setLabel("bottom", "Floppy")



disk.getLabel

Function disk.getLabel
Syntax disk.getLabel(string side)
Returns string disk label
Description No description provided.

Examples

Description Checks for data saved on the disk in the bottom drive
Code
print(disk.getLabel("bottom"))
Output Floppy --Output changes according to the disk label



disk.hasAudio

Function disk.hasAudio
Syntax disk.hasAudio(string side)
Returns boolean there is audio saved on the disk
Description No description provided.

Examples

Description Checks for audio saved on the disk in the bottom drive
Code
print(disk.hasAudio("bottom"))
Output true if there is audio, otherwise false



disk.getAudioTitle

Function disk.getAudioTitle
Syntax disk.getAudioTitle(string side)
Returns string audio title
Description No description provided.

Examples

Description Returns the title of an audio disk
Code
print(disk.getAudioTitle("bottom"))
Output C418 - ward Output changes according to the audio title



disk.playAudio

Function disk.playAudio
Syntax disk.playAudio(string side)
Returns nil
Description No description provided.

Examples

Description Plays the audio found on the disk on the bottom drive (if any)
Code
disk.playAudio("bottom")



disk.stopAudio

Function disk.stopAudio
Syntax disk.stopAudio(string side)
Returns nil
Description No description provided.

Examples

Description Stops the audio playing on the disk on the bottom drive (if any)
Code
disk.stopAudio("bottom")



disk.eject

Function disk.eject
Syntax disk.eject(string side)
Returns nil
Description No description provided.

Examples

Description Ejects the disk in the bottom drive
Code
disk.eject("bottom")

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.