Disk API

Revision as of 01:13, 25 December 2012 by Mastergalen (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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")
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis