Standard I/O
zune.io
A library to use standard input/output in luau.
Properties
stdout
stdout: FileHandlestderr
stderr: FileHandlestdin
stdin: FileHandleFunctions
format
Formats input to a readable string.
format(...any): stringParameters
...any- The values to format.
Throws
- Memory Error
createBufferSink
Creates a buffer sink.
createBufferSink(opts: export type BufferSinkOptions = {
limit: number?,
size: number?,
}BufferSinkOptionsexport type BufferSinkOptions = {
limit: number?,
size: number?,
}?): BufferSinkParameters
opts: BufferSinkOptions?- The options for the buffer sink.limit: number?- The maximum amount of bytes allowed to be written to the buffer.- default:
1073741824
- default:
size: number?- The initial size of the buffer.- default:
0
- default:
Throws
- Memory Error
createFixedBufferStream
Creates a buffer stream.
createFixedBufferStream(buffer: buffer): BufferStreamParameters
buffer: buffer- The buffer to create the stream with.
Throws
- Memory Error
Namespaces
terminal
PROPERTIES
isTTY
Whether the terminal is a TTY.
terminal.isTTY: booleanFUNCTIONS
getCurrentMode
Get current saved mode.
terminal.getCurrentMode(): "normal" | "raw"enableRawMode
Enable raw mode.
On unix: Will attempt to change terminal mode. On windows: Will attempt to change console mode.
returns true if the operation was successful.
terminal.enableRawMode(): booleanrestoreMode
Restores the terminal to the original mode.
On unix: Will attempt to restore the original terminal mode. On windows: Will attempt to restore the original console mode.
returns true if the operation was successful.
terminal.restoreMode(): booleangetSize
Gets the terminal size.
Returns a tuple of (width, height). Otherwise returns (nil, nil) if current terminal is not a TTY.
terminal.getSize(): (number?, number?)Throws
- Terminal Error
Last updated on