The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SPVM::IO::Handle - I/O Handling

Description

SPVM::IO::Handle is the SPVM's IO::Handle class for I/O handling.

Usage

  use IO::Handle;
  my $handle = IO::Handle->new;
  $handle->set_autoflush(1);

Instance Methods

Fields

autoflush

  has autoflush : rw byte;

input_line_number

  has input_line_number : ro int;

opened

  has opened : ro protected int;

blocking_flag

  has blocking_flag : rw protected int;
  

Class methods

new

  static method new : IO::Handle ($options : object[]);

Instance Methods

init

  method init : void ($options = undef : object[]);

close

  method close : int ();

eof

  method eof : int ();

fileno

  method fileno : int ();

getc

  method getc : int ();

print

  method print : int ($string : string);

say

  method say : int ($string : string);

printf

  method printf : int ($format : string, $args : object[]...);

clearerr

  method clearerr : void ();

error

  method error : int ();

flush

  method flush : int ();

ungetc

  method ungetc : int ($c : int);

printflush

  method printflush : int ($string : string);

truncate

  method truncate : int ($legnth : long);

ioctl

  method ioctl : int ($request : int, $request_arg = undef : object of Byte|Short|Int|Long|Float|Double|object);

sync

  method sync : int ();

stat

  method stat : int ($stat : Sys::IO::Stat);

getline

  method getline : string ();

getlines

  method getlines : string ();

fcntl

  method fcntl : int ($command : int, $command_arg = undef : object of Int|Sys::IO::Flock|object);

blocking

  method blocking : void ($blocking : int);

write

  method write : int ($buffer : string, $length : int, $offset = 0 : int);

read

  method read : int ($buffer : mutable string, $length : int, $offset = 0 : int);

syswrite

  method syswrite : int ($buffer : string, $length : int, $offset = 0 : int);

sysread

  method sysread : int ($buffer : mutable string, $length : int, $offset = 0 : int);

Well Known Child Classes

IO::File

IO::File

IO::Socket

IO::Socket

IO::Socket::INET

IO::Socket::INET

See Also

IO::Handle

SPVM::IO::Handle is the Perl's IO::Handle porting to SPVM.

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License