SPVM::IO::Handle - I/O Handling
SPVM::IO::Handle is the SPVM's IO::Handle class for I/O handling.
SPVM::IO::Handle
IO::Handle
use IO::Handle; my $handle = IO::Handle->new; $handle->set_autoflush(1);
has fd : protected int;
A file descriptor.
has autoflush : rw byte;
has opened : ro protected int;
has Blocking : rw protected int;
static method new : IO::Handle ($options : object[]);
method init : void ($options : object[] = undef);
method opened : int ();
If the return value of "fileno" is greater than or equal to 0, returns 1. Otherwise returns 0.
method fileno : int ();
Gets "fh" field.
method print : void ($string : string);
method printf : void ($format : string, $args : object[]...);
method say : void ($string : string);
method truncate : void ($legnth : long);
Truncates to a size of precisely length bytes.
This method is planed to be implemented in a child class.
This method always throws an exception.
static method ioctl : int ($fd : int, $request : int, $request_arg_ref : object of byte[]|short[]|int[]|long[]|float[]|double[]|object = undef);
method sync : void ();
method stat : Sys::IO::Stat ();
method fcntl : int ($command : int, $command_arg : object = undef of Int|Sys::IO::Flock|object);
method set_blocking : void ($blocking : int);
method syswrite : int ($string : string, $length : int = -1, $offset : int = 0) {
method sysread : int ($string : mutable string, $length : int = -1, $offset : int = 0) {
method write : int ($string : string, $length : int = -1, $offset : int = 0);
Exceptions:
Not implemented.
method read : int ($string : mutable string, $length : int = -1, $offset : int = 0);
method close : int ();
IO::File
IO::Socket
IO::Socket::INET
SPVM::IO::Handle is the Perl's IO::Handle porting to SPVM.
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::IO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::IO
CPAN shell
perl -MCPAN -e shell install SPVM::IO
For more information on module installation, please visit the detailed CPAN module installation guide.