NAME

src/pmc/handle.pmc - 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 read_bytes(INTVAL bytes)
Read the given number of bytes from the handle and return them in a ByteBuffer. If bytes is omitted, or if it's -1 the handle will attempt to read whatever is available, up to the size of the buffer.
METHOD record_separator()
Set the record separator for readline.
METHOD close()
Close the handle.
METHOD encoding(STRING *new_encoding)
Set or retrieve the encoding attribute (a string name of the selected encoding scheme) for the filehandle.

*/

/* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : */