std1.0.0-beta-7 SafeC docs

std :: io_traits

Function std::copy_stream

#include <std/io_traits.h> source

generic<R: Reader, W: Writer> long long copy_stream(&R r, &W w)

Copies r into w until r's end. Returns the byte count copied, or -1 if a read or write failed (what was copied before stays written).