--------------------------------- File::Read Read from the file
| 179 | // Read from the file |
| 180 | // |
| 181 | std::vector<uint8> File::ReadChunk(uint64 const offset, uint64 const numBytes) |
| 182 | { |
| 183 | ET_ASSERT(m_IsOpen); |
| 184 | ET_ASSERT(offset + numBytes <= GetSize(), |
| 185 | "Range of bytes requested exceeds file size! Offset:'%u'; Bytes:'%u'; Total:'%u'; Size:'%u'", |
| 186 | offset, numBytes, offset + numBytes, GetSize()); |
| 187 | |
| 188 | std::vector<uint8> content; |
| 189 | if (!FILE_BASE::ReadFile(m_Handle, content, numBytes, offset)) |
| 190 | { |
| 191 | LOG("File::ReadChunk > Reading file failed", Error); |
| 192 | } |
| 193 | |
| 194 | return content; |
| 195 | } |
| 196 | |
| 197 | //--------------------------------- |
| 198 | // File::Write |
no test coverage detected