Crashpad
Public Member Functions | List of all members
crashpad::internal::ReadExactlyInternal Class Referenceabstract

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

Detailed Description

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.

Member Function Documentation

◆ ReadExactly()

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.

Returns
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.

The documentation for this class was generated from the following files: