## std.io: Platform-independent I/O constructs. ## This module is imported by default. pub type File = ... pub type FileMode = union[Read, Write, ReadWrite, Append] # todo: file destructors call `close` pub const stdout: File = ... pub const stdin: File = ... pub const stderr: File = ... pub func open(path: str, mode: FileMode): File = ... pub func close(file: File) = ... pub func write(file: File, values: varargs[str]) = ... pub func read(file: File): str? = ... pub func lines(file: File): Iter[str] = ... pub func chars(file: File): Iter[chr] = ...