io.ops
Parrot's IO API
- close(inout PMC)
-
Close IO object $1
- open(out PMC, in STR, in STR)
-
Open URL (file, address, database, in core image) named $2 with
Perl style mode string in $3 and create an IO object in $1.
- print(in PMC, in STR)
-
Print String $2 on the IO stream object $1.
- printerr(in STR)
-
Print $1 to interp.stderr IO stream (unbuffered)
- puts(in STR)
-
Print $1 to standard output stream
This will go away when print ops are all migrated to
use ParrotIO instead of STDIO. Right now ParrotIO is
not stable enough to replace STDIO.
- read(out STR, in INT)
-
Read up to N bytes from standard input stream
If stream is linebuffered, will return at EOL, for
files it will read MIN(MAX(avail, N), 65535) bytes.
Warning: This is a quick hack.
- read(out STR, in PMC, in INT)
-
Read up to N bytes from IO PMC stream.
If stream is linebuffered, will return at EOL, for
files it will read MIN(MAX(avail, N), 65535) bytes.
Warning: This is a quick hack.
- seek(out INT, in PMC, in INT, in INT)
-
32bit seek:
Set file position to offset $3 on IO stream $2. 'whence' is
indicated by the value in $4.
- seek(out INT, in PMC, in INT, in INT, in INT)
-
64bit seek:
Set file position to offset ($3 << 32 | $4) on IO stream $2. 'whence' is
indicated by the value in $4.
Copyright (C) 2001-2002 Yet Another Society. All rights reserved.
This program is free software. It is subject to the same license
as the Parrot interpreter itself.