Tty

expect class Tty : AutoCloseable
actual class Tty : AutoCloseable
actual class Tty : AutoCloseable

Types

Link copied to clipboard
expect interface Callback
actual interface Callback
actual interface Callback
Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion

Functions

Link copied to clipboard
expect open override fun close()

Free the resources associated with this reader.

actual open override fun close()
actual open override fun close()
Link copied to clipboard
expect fun currentSize(): IntArray
actual fun currentSize(): IntArray
actual fun currentSize(): IntArray
Link copied to clipboard
expect fun enableRawMode()
actual fun enableRawMode()
actual fun enableRawMode()
Link copied to clipboard
Link copied to clipboard
expect fun interruptRead()

Signal blocking calls to readInput or readInputWithTimeout to wake up and return 0.

actual fun interruptRead()
actual fun interruptRead()
Link copied to clipboard
expect fun readInput(buffer: ByteArray, offset: Int, count: Int): Int

Read up to count bytes into buffer at offset from the standard input stream. The number of bytes read will be returned. 0 will be returned if interruptRead is called while waiting for input. -1 will be returned if the input stream is closed.

actual fun readInput(buffer: ByteArray, offset: Int, count: Int): Int
actual fun readInput(buffer: ByteArray, offset: Int, count: Int): Int
Link copied to clipboard
expect fun readInputWithTimeout(buffer: ByteArray, offset: Int, count: Int, timeoutMillis: Int): Int

Read up to count bytes into buffer at offset from the standard input stream. The number of bytes read will be returned. 0 will be returned if interruptRead is called while waiting for input, or if at least timeoutMillis have passed without data. -1 will be returned if the input stream is closed.

actual fun readInputWithTimeout(buffer: ByteArray, offset: Int, count: Int, timeoutMillis: Int): Int
actual fun readInputWithTimeout(buffer: ByteArray, offset: Int, count: Int, timeoutMillis: Int): Int
Link copied to clipboard
expect fun writeError(buffer: ByteArray, offset: Int, count: Int): Int

Write up to count bytes from buffer at offset to the standard error stream. The number of bytes written will be returned.

actual fun writeError(buffer: ByteArray, offset: Int, count: Int): Int
actual fun writeError(buffer: ByteArray, offset: Int, count: Int): Int
Link copied to clipboard
expect fun writeOutput(buffer: ByteArray, offset: Int, count: Int): Int

Write up to count bytes from buffer at offset to the standard output stream. The number of bytes written will be returned.

actual fun writeOutput(buffer: ByteArray, offset: Int, count: Int): Int
actual fun writeOutput(buffer: ByteArray, offset: Int, count: Int): Int