file¶
type dir < sequenceTBD
fun dir(Path: string): dirTBD
meth (Dir: dir):read: stringTBD
type file < streamA file handle for reading / writing.
fun file(Path: string, Mode: string): fileOpens the file at
Pathdepending onMode,"r": opens the file for reading,"w": opens the file for writing,"a": opens the file for appending.
meth (File: file):closeCloses
File.meth (File: file):eof: File | nilReturns
FileifFileis closed, otherwise returnnil.meth (File: file):flushFlushes any pending writes to
File.type file::mode < enum::DIR::CHR::BLK::REG::LNK::SOCK::FIFO
type file::statTBD
fun file::stat(Path: string): file::statTBD
meth (Arg₁: file::stat):atimeTBD
meth (Arg₁: file::stat):ctimeTBD
meth (Arg₁: file::stat):modeTBD
meth (Arg₁: file::stat):mtimeTBD
meth (Arg₁: file::stat):sizeTBD
type popen < fileA file that reads or writes to a running subprocess.
fun popen(Command: string, Mode: string): popenExecutes
Commandwith the shell and returns an open file to communicate with the subprocess depending onMode,"r": opens the file for reading,"w": opens the file for writing.
meth (File: popen):close: integerWaits for the subprocess to finish and returns the exit status.
fun dir::create(Path: string, Mode: integer)TBD
fun dir::remove(Path: string)TBD
fun file::exists(Path: string): string | nilTBD
fun file::realpath(Path: string): string | nilTBD
fun file::rename(Old: string, New: string)Renames the file
OldtoNew.fun file::unlink(Path: string)Removes the file at
Path.