# File Abstract Stream
class FStream
-special IOS
-special NativeFileCapable
+ super IOS
+ super NativeFileCapable
# The path of the file.
readable var _path: nullable String = null
# File input stream
class IFStream
-special FStream
-special BufferedIStream
+ super FStream
+ super BufferedIStream
# Misc
fun reopen
# File output stream
class OFStream
-special FStream
-special OStream
+ super FStream
+ super OStream
# Write a string.
redef fun write(s)
###############################################################################
class Stdin
-special IFStream
+ super IFStream
private init do
_file = native_stdin
_path = "/dev/stdin"
end
class Stdout
-special OFStream
+ super OFStream
private init do
_file = native_stdout
_path = "/dev/stdout"
end
class Stderr
-special OFStream
+ super OFStream
private init do
_file = native_stderr
_path = "/dev/stderr"
end
universal FileStat
-special Pointer
+ super Pointer
# This class is system dependent ... must reify the vfs
fun mode: Int is extern "file_FileStat_FileStat_mode_0"
fun atime: Int is extern "file_FileStat_FileStat_atime_0"
# Instance of this class are standard FILE * pointers
private universal NativeFile
-special Pointer
+ super Pointer
fun io_read(buf: NativeString, len: Int): Int is extern "file_NativeFile_NativeFile_io_read_2"
fun io_write(buf: NativeString, len: Int): Int is extern "file_NativeFile_NativeFile_io_write_2"
fun io_close: Int is extern "file_NativeFile_NativeFile_io_close_0"