# The FILE *.
private var file: nullable NativeFile = null
+ # The status of a file. see POSIX stat(2).
fun file_stat: FileStat do return _file.file_stat
# File descriptor of this file
end
end
- private init do end
- private init without_file do end
end
# File output stream
self.path = path
_is_writable = true
end
-
- private init do end
- private init without_file do end
end
###############################################################################
+# Standard input stream.
class Stdin
super IFStream
- private init do
+ init do
_file = new NativeFile.native_stdin
path = "/dev/stdin"
prepare_buffer(1)
redef fun poll_in: Bool is extern "file_stdin_poll_in"
end
+# Standard output stream.
class Stdout
super OFStream
- private init do
+ init do
_file = new NativeFile.native_stdout
path = "/dev/stdout"
_is_writable = true
end
end
+# Standard error stream.
class Stderr
super OFStream
- private init do
+ init do
_file = new NativeFile.native_stderr
path = "/dev/stderr"
_is_writable = true