Docs Demo Source

IO Library

YASL’s IO library has the following functions and constants.

IO constants

Name Description
stdin standard input
stdout standard output
stderr standard error

IO functions

Name Arguments Description
open name, mode? Returns the file from opening name in mode mode. Valid modes are 'r', 'w', 'a', 'r+', 'w+', 'a+'. mode defaults to 'r' if not supplied.

File functions

Name Arguments Description
read self, mode Valid modes are 'l' and 'a'. If mode is 'l', returns the next line from self. If mode is 'a', reads and returns the entire file.
write self, val Writes val to self.
flush self Flushes self.