Commit 394e5c18 authored by Tom Niget's avatar Tom Niget

Add file.flush

parent 1d803b10
...@@ -156,6 +156,9 @@ struct { ...@@ -156,6 +156,9 @@ struct {
METHOD( METHOD(
typon::Task<void>, close, (), typon::Task<void>, close, (),
const { co_await typon::io::close(self->fd); }) const { co_await typon::io::close(self->fd); })
METHOD(
typon::Task<void>, flush, (),
const { co_await typon::io::fsync(self->fd); })
type(int fd = -1, size_t len = 0) : fd(fd), len(len) {} type(int fd = -1, size_t len = 0) : fd(fd), len(len) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment