Disk API
|
|||||||||
Ejects the disk in the disk drive at drive. This will eject the disk item itself out of the drive and back into the world. |
|||||||||
Syntax | disk.eject(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | disk | ||||||||
|
|
|||||||||||
Returns the title from a music disk in the given disk drive. Returns false, if there is no music disk in the disk drive. | |||||||||||
Syntax | disk.getAudioTitle(
|
||||||||||
Returns | string title | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | disk | ||||||||||
|
|
|||||||||||
Returns the ID of the disk drive attached at the specified side or network name. Returns nil if there is no disk drive attached at the specified side or network name or there is no disk in the disk drive. | |||||||||||
Syntax | disk.getID(
|
||||||||||
Returns | number ID | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | disk | ||||||||||
|
|
|||||||||||
Returns the label of the disk inside the disk drive at the specified side or network name. Returns nil when no peripheral is attached at the specified side or network name or there is no disk inside the disk drive. | |||||||||||
Syntax | disk.getLabel(
|
||||||||||
Returns | string label | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | disk | ||||||||||
| |||||||||||
|
|
|||||||||||
Returns path where the content of a Floppy Disk is mounted in CraftOS. Returns nil, if there is no Floppy Disk in the given disk drive. | |||||||||||
Syntax | disk.getMountPath(
|
||||||||||
Returns | string path | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | disk | ||||||||||
|
|
|||||||||||
Checks if a disk drive has an item attached, and if that item is a music disk. | |||||||||||
Syntax | disk.hasAudio(
|
||||||||||
Returns | boolean result | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | disk | ||||||||||
|
|
|||||||||||
Checks if a disk drive has an item attached, and if that item is a floppy disk. | |||||||||||
Syntax | disk.hasData(
|
||||||||||
Returns | boolean result | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | disk | ||||||||||
|
Disk.isDrive
|
|||||||||||
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. | |||||||||||
Syntax | disk.isPresent(
|
||||||||||
Returns | boolean result | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | disk | ||||||||||
|
|
|||||||||
Plays a music disk. | |||||||||
Syntax | disk.playAudio(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | disk | ||||||||
|
|
|||||||||
Set the label of a disk. | |||||||||
Syntax | disk.setLabel(
|
||||||||
Returns | number ID | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | disk | ||||||||
|
|
|||||||||
Stop playing of a music disk which was started with disk.playAudio. | |||||||||
Syntax | disk.stopAudio(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | disk | ||||||||
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.