0 [DEVELOPER] IOP API Documentation
MultHub or something edited this page 2017-09-24 21:54:19 +02:00

IOP

The IOP (input/output processor) API is designed to efficiently and effectively handle inputs all in one API. It has flexible syntax and is even capable of managing the file system.


iop.run("string")

Runs a specified program.


iop.loadAPI("string")

Loads a specified API.


iop.unloadAPI("string")

Unloads a specified API from memory.


iop.qEvt OR iop.queueEvent("string")

Queues an event.


iop.pullEvt OR iop.pullEvent("event")

Pulls a specified event.


iop.pullEvtRaw OR iop.pullEventRaw("event")

Pulls a specified event similar to os.pullEventRaw.

File System


iop.list("path")

Lists files in a specified destination.


iop.getName("path")

Obtains the name of something.


iop.getDrive("drive")

Obtain information about the drive.


iop.getSize("path")

Check how much space a specified destination has.


iop.freeSpace("path")

Check how much space a specified destination has available.


iop.mkDir("path")

Creates a directory at a given destination.


iop.move("a", "b")

Moves a file/directory.


iop.copy("a", "b")

Copies a file/directory.


iop.delete("path")

Deletes a file/directory.


iop.combine("base", "local")

Combines two files.


iop.open("path")

Directly opens a file for writing/modifying.


iop.getDir("path")

Obtains information about a directory.


iop.diskPresent()

Checks if disk is present. (ie. if iop.diskPresent() then)


iop.diskHasData()

Checks if a disk has data (ie. if iop.diskHasData() then)


iop.diskMountPath("string")

Obtains the mount path of a disk.


iop.getDiskLabel("side")

Obtains the label of a disk.


iop.getDiskID("side")

Gets the ID of a disk in a specified side.


iop.eject("side")

Ejects a disk at a specified side.

Peripheral I/O


iop.pIsPresent()

Verifies if a peripheral is present (ie. if iop.pIsPresent() then)


iop.pGetType("side")

Obtains information about what type of peripheral is attached at a specified side.


iop.pGetMethods("side")

Obtains information about methods of a peripheral attached at a specified side.


iop.pCall("string")

Makes a call to output to a peripheral.


iop.pWrap("side")

Wraps to a peripheral on a specified side.


iop.pFind("type")

Searches for a type of peripheral.


iop.pGetNames("side")

Obtains name info of a peripheral at a specified side.

Redstone


iop.rGetSides()

Returns list of valid redstone sides.


iop.rGetInput("side")

Checks redstone input at a specified side.


iop.rSetOutput("side", true/false)

Sets redstone output at a specified side.


iop.rGetOutput("side")

Checks redstone output at a specified side.


iop.rGetAnalogInput("side")

Checks redstone input signal strength (0-15) at a specified side.


iop.rSetAnalogOutput("side", 0-15)

Sets redstone signal strength at a specified side.


iop.rGetAnalogOutput("side")

Checks redstone output signal strength at a specified side.


iop.rGetBundledInput("side")

Checks bundled redstone input at a specified side.

Bundled redstone carries 16 redstone signals, represented by a 16-bit unsigned integer.


iop.rSetBundledOutput("side", 0-65535)

Sets bundled redstone output at a specified side.


iop.rGetBundledOutput("side")

Checks bundled redstone output at a specified side.


iop.rTestBundledInput("side", 0-65535)

Compares bundled redstone input at a specified side with a 16-bit unsigned integer.

(input & testValue) == testValue

iop.getKeyName(keyID)

Returns the key name with the specified ID.