NAME

src/pmc/handle.pmc - IO Handle PMC

DESCRIPTION

This is the base-class for all IO-related PMCs.

Vtable Functions

init
init_pmc
Handle shouldn't be directly instantiated, init and init_pmc throws EXCEPTION_INVALID_OPERATION.

Methods

METHOD isatty()
Returns a boolean value indicating whether SELF is a console/tty. This default implementation always return false. Override it in subtypes that are or can be tty.
METHOD get_fd()
Retrieve the integer file descriptor for the Handle (only available on platforms that use integer file descriptors).
METHOD read(INTVAL bytes)
Read the given number of bytes from the handle and return them in a string.
METHOD readline()
Read a line from the handle and return it in a string.
METHOD record_separator()
Set the record separator for readline.
METHOD close()
Close the handle.