os: add flush method
parent
3281e44e84
commit
5d7bac2016
|
@ -239,6 +239,10 @@ pub fn (f File) writeln(s string) {
|
||||||
C.fputs('\n', f.cfile)
|
C.fputs('\n', f.cfile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn (f File) flush() {
|
||||||
|
C.fflush(f.cfile)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn (f File) close() {
|
pub fn (f File) close() {
|
||||||
C.fclose(f.cfile)
|
C.fclose(f.cfile)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue