| 85 | } |
| 86 | |
| 87 | bool UnixFile::Read(void* buffer, uint32 bytesToRead, uint32* bytesRead) |
| 88 | { |
| 89 | const ssize_t tmp = read(_handle, buffer, bytesToRead); |
| 90 | if (tmp != -1) |
| 91 | { |
| 92 | if (bytesRead) |
| 93 | *bytesRead = tmp; |
| 94 | return false; |
| 95 | } |
| 96 | if (bytesRead) |
| 97 | *bytesRead = 0; |
| 98 | LOG_UNIX_LAST_ERROR; |
| 99 | return true; |
| 100 | } |
| 101 | |
| 102 | bool UnixFile::Write(const void* buffer, uint32 bytesToWrite, uint32* bytesWritten) |
| 103 | { |
no test coverage detected