crashpad::FileWriterInterface Class Referenceabstract

An interface to write to files and other file-like objects with semantics matching the underlying platform (POSIX or Windows). More...

`#include "util/file/file_writer.h"`

Inheritance diagram for crashpad::FileWriterInterface:

## Public Member Functions

virtual bool | Write (const void *data, size_t size)=0
| Wraps LoggingWriteFile(), or provides an implementation with identical semantics. More...
virtual bool | WriteIoVec (std::vector< WritableIoVec > *iovecs)=0
| Wraps `writev()` on POSIX or provides an alternate implementation with identical semantics. This method will write entire buffers, continuing after a short write or after being interrupted. On non-POSIX this is a simple wrapper around Write(). More...
Public Member Functions inherited from crashpad::FileSeekerInterface
virtual FileOffset | Seek (FileOffset offset, int whence)=0
| Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. More...
FileOffset | SeekGet ()
| Wraps Seek(), using `SEEK_CUR` to obtain the file’s current position. More...
bool | SeekSet (FileOffset offset)
| Wraps Seek(), using `SEEK_SET`, ensuring that the seek succeeded and the file is positioned as desired. More...

## Detailed Description

An interface to write to files and other file-like objects with semantics matching the underlying platform (POSIX or Windows).

## Member Function Documentation

## Write()

virtual bool crashpad::FileWriterInterface::Write | ( | const void * | data,
|  | size_t | size
| ) |  |

pure virtual

Wraps LoggingWriteFile(), or provides an implementation with identical semantics.

Returns
  `true` if the operation succeeded, `false` if it failed, with an error message logged.

Implemented in crashpad::FileWriter, crashpad::WeakFileHandleFileWriter, and crashpad::StringFile.

## WriteIoVec()

virtual bool crashpad::FileWriterInterface::WriteIoVec | ( | std::vector< WritableIoVec > * | iovecs | ) |

pure virtual

Wraps `writev()` on POSIX or provides an alternate implementation with identical semantics. This method will write entire buffers, continuing after a short write or after being interrupted. On non-POSIX this is a simple wrapper around Write().

Returns
  `true` if the operation succeeded, `false` if it failed, with an error message logged.

Note
  The contents of iovecs are undefined when this method returns.

Implemented in crashpad::FileWriter, crashpad::WeakFileHandleFileWriter, and crashpad::StringFile.

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

- util/file/file_writer.h