MCPcopy Create free account
hub / github.com/ElementsProject/elements / read

Method read

src/streams.h:528–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526 int GetVersion() const { return nVersion; }
527
528 void read(Span<std::byte> dst)
529 {
530 if (!file)
531 throw std::ios_base::failure("CAutoFile::read: file handle is nullptr");
532 if (fread(dst.data(), 1, dst.size(), file) != dst.size()) {
533 throw std::ios_base::failure(feof(file) ? "CAutoFile::read: end of file" : "CAutoFile::read: fread failed");
534 }
535 }
536
537 void ignore(size_t nSize)
538 {

Callers 1

readMethod · 0.45

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected