iostream.stream.flush
Flushes the stream and returns non-null on success
Return value
1 on success, null on failure.
Notes
A blob has nothing buffered, so flush on a blob always succeeds. The same method works on a file, where it flushes the C library's write buffer for that file; it can return null there if the underlying write fails.
Example
from "iostream" import blob
let b = blob(0)
b.writen(1, 'i')
println(b.flush()) // a blob has nothing buffered to flush; this always succeedsOutput:
1See also
flush | Flushes the stream and returns non-null on success |
writen | Writes a numeric value in the given format |
writeblob | Writes the given blob and returns the number of bytes written |
| stream | class index |