23 static const size_t buffer_size = 4096;
24 char buffer[buffer_size];
26 source.read(buffer, buffer_size);
27 size_t count = source.gcount();
29 dest.write(buffer, count);
30 source.read(buffer, buffer_size);
31 count = source.gcount();
34 return (!source.fail() || source.eof()) && (!dest.fail());
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool copy_stream(std::istream &source, std::ostream &dest)
Reads the source stream from its current position to the end of the stream, and writes that data to t...