os: add flush method

pull/1119/head
Justice Suh 2019-07-12 20:11:11 -04:00 committed by Alexander Medvednikov
parent 3281e44e84
commit 5d7bac2016
1 changed files with 4 additions and 0 deletions

View File

@ -239,6 +239,10 @@ pub fn (f File) writeln(s string) {
C.fputs('\n', f.cfile)
}
pub fn (f File) flush() {
C.fflush(f.cfile)
}
pub fn (f File) close() {
C.fclose(f.cfile)
}