MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / read

Method read

src/basicio.cpp:521–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521DataBuf FileIo::read(size_t rcount) {
522 if (rcount > size())
523 throw Error(ErrorCode::kerInvalidMalloc);
524 DataBuf buf(rcount);
525 size_t readCount = read(buf.data(), buf.size());
526 if (readCount == 0) {
527 throw Error(ErrorCode::kerInputDataReadFailed);
528 }
529 buf.resize(readCount);
530 return buf;
531}
532
533size_t FileIo::read(byte* buf, size_t rcount) {
534 if (p_->switchMode(Impl::opRead) != 0) {

Callers 4

writeMethod · 0.45
ReadStdinMethod · 0.45
writeDataToFileMethod · 0.45
readFileFunction · 0.45

Calls 8

sizeFunction · 0.85
ErrorFunction · 0.85
dataMethod · 0.80
resizeMethod · 0.80
switchModeMethod · 0.80
populateBlocksMethod · 0.80
sizeMethod · 0.45
getDataMethod · 0.45

Tested by

no test coverage detected