| 58 | } |
| 59 | |
| 60 | int64_t AutoFile::size() |
| 61 | { |
| 62 | if (IsNull()) { |
| 63 | throw std::ios_base::failure("AutoFile::size: file handle is nullptr"); |
| 64 | } |
| 65 | // Temporarily save the current position |
| 66 | int64_t current_pos = tell(); |
| 67 | seek(0, SEEK_END); |
| 68 | int64_t file_size = tell(); |
| 69 | // Restore the original position |
| 70 | seek(current_pos, SEEK_SET); |
| 71 | return file_size; |
| 72 | } |
| 73 | |
| 74 | void AutoFile::read(std::span<std::byte> dst) |
| 75 | { |
no outgoing calls
no test coverage detected