Crashpad
|
The internal implementation of ReadFileExactly() and its wrappers. More...
#include "util/file/file_io.h"
Public Member Functions | |
bool | ReadExactly (void *buffer, size_t size, bool can_log) |
Calls Read(), retrying following a short read, ensuring that exactly size bytes are read. More... | |
The internal implementation of ReadFileExactly() and its wrappers.
The logic is exposed so that it may be reused by FileReaderInterface, and so that it may be tested without requiring large files to be read. It is not intended to be used more generally. Use ReadFileExactly(), LoggingReadFileExactly(), CheckedReadFileExactly(), or FileReaderInterface::ReadExactly() instead.
bool crashpad::internal::ReadExactlyInternal::ReadExactly | ( | void * | buffer, |
size_t | size, | ||
bool | can_log | ||
) |
Calls Read(), retrying following a short read, ensuring that exactly size bytes are read.
true
on success. false
if the underlying Read() fails or if fewer than size bytes were read. When returning false
, if can_log is true
, logs a message.