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 : string = undef, $open_mode : string = undef);

new_from_fd

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

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);

write

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

read

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

See Also

Perl's IO::File

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

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License