The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Name

SPVM::IO::File - File Input/Output

Usage

  use IO::File;
   
  my $io_file = IO::File->new("file", "r");
  $io_file->print("Hello");

Description

SPVM::IO::File provides File Input/Output.

Parent Class

IO::Handle.

Fields

stream

  has stream : Sys::IO::FileStream;

new

  static method new : IO::File ($file_name = undef : string, $open_mode = undef : string);

new_from_fd

  static method new_from_fd : IO::Handle ($fd : int, $open_mode = undef : string);

open

  method open : void ($file_name : string, $open_mode : string);

fdopen

  method fdopen : void ($fd : int, $open_mode : string);

init

  protected method init : void ();

DESTROY

  method DESTROY : void ();

getline

  method getline : string ();

getlines

  method getlines : string ();

close

  method close : int ();

eof

  method eof : int ();

fileno

  method fileno : int ();

getc

  method getc : int ();

print

  method print : int ($string : string);

clearerr

  method clearerr : void ();

error

  method error : int ();

flush

  method flush : int ();

ungetc

  method ungetc : int ($c : int);

syswrite

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

sysread

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

See Also

Perl's IO::File

IO::File is a Perl's IO::File porting to SPVM.