MCPcopy Create free account
hub / github.com/assaultcube/AC / streamcopy

Function streamcopy

source/src/stream.cpp:1111–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109}
1110
1111int streamcopy(stream *dest, stream *source, int maxlen)
1112{
1113 int got = 0, len;
1114 uchar copybuf[1024];
1115 while(got < maxlen && (len = source->read(copybuf, 1024))) got += dest->write(copybuf, len);
1116 return got;
1117}
1118
1119#ifndef STANDALONE
1120void filerotate(const char *basename, const char *ext, int keepold, const char *oldformat) // rotate old logfiles

Callers 2

zipmanualreadFunction · 0.85
processdownloadFunction · 0.85

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected