v/vlib/io/io.v

18 lines
200 B
V
Raw Normal View History

2021-04-25 20:22:33 +02:00
module io
const (
buf_max_len = 5 * 1024
)
pub fn cp(dst Writer, src Reader) ? {
mut buf := read_all(reader: src) or {
return err
}
dst.write(buf) or {
return
}
unsafe {
buf.free()
}
}