MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / copyFrom

Method copyFrom

Engine/source/core/stream/stream.cpp:364–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364bool Stream::copyFrom(Stream *other)
365{
366 U8 buffer[1024];
367 U32 numBytes = other->getStreamSize() - other->getPosition();
368 while((other->getStatus() != Stream::EOS) && numBytes > 0)
369 {
370 U32 numRead = numBytes > sizeof(buffer) ? sizeof(buffer) : numBytes;
371 if(! other->read(numRead, buffer))
372 return false;
373
374 if(! write(numRead, buffer))
375 return false;
376
377 numBytes -= numRead;
378 }
379
380 return true;
381}
382
383Stream* Stream::clone() const
384{

Callers 6

copySketchupTextureFunction · 0.45
streamObject.cppFile · 0.45
copyFileToNewZipMethod · 0.45
addFileMethod · 0.45
extractFileMethod · 0.45

Calls 5

writeFunction · 0.50
getStreamSizeMethod · 0.45
getPositionMethod · 0.45
getStatusMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected