| 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 | { |