Crashpad
|
A file writer implementation that wraps traditional system file operations on files accessed through the filesystem. More...
#include "util/file/file_writer.h"
Public Member Functions | |
bool | Open (const base::FilePath &path, FileWriteMode write_mode, FilePermissions permissions) |
Wraps LoggingOpenFileForWrite(). More... | |
void | Close () |
Wraps CheckedCloseHandle(). More... | |
bool | Write (const void *data, size_t size) override |
Wraps LoggingWriteFile(), or provides an implementation with identical semantics. More... | |
bool | WriteIoVec (std::vector< WritableIoVec > *iovecs) override |
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... | |
FileOffset | Seek (FileOffset offset, int whence) override |
Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. More... | |
Public Member Functions inherited from crashpad::FileSeekerInterface | |
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... | |
A file writer implementation that wraps traditional system file operations on files accessed through the filesystem.
void crashpad::FileWriter::Close | ( | ) |
Wraps CheckedCloseHandle().
bool crashpad::FileWriter::Open | ( | const base::FilePath & | path, |
FileWriteMode | write_mode, | ||
FilePermissions | permissions | ||
) |
Wraps LoggingOpenFileForWrite().
true
if the operation succeeded, false
if it failed, with an error message logged.
|
overridevirtual |
Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics.
-1
on failure, with an error message logged.Implements crashpad::FileSeekerInterface.
|
overridevirtual |
Wraps LoggingWriteFile(), or provides an implementation with identical semantics.
true
if the operation succeeded, false
if it failed, with an error message logged.Implements crashpad::FileWriterInterface.
|
overridevirtual |
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().
true
if the operation succeeded, false
if it failed, with an error message logged.Implements crashpad::FileWriterInterface.