Crashpad
|
An interface to seek in files and other file-like objects with semantics matching the underlying platform (POSIX or Windows). More...
#include "util/file/file_seeker.h"
Public Member Functions | |
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... | |
An interface to seek in files and other file-like objects with semantics matching the underlying platform (POSIX or Windows).
|
pure virtual |
Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics.
-1
on failure, with an error message logged. Implemented in crashpad::FileWriter, crashpad::FileReader, crashpad::WeakFileHandleFileWriter, crashpad::WeakFileHandleFileReader, and crashpad::StringFile.
FileOffset crashpad::FileSeekerInterface::SeekGet | ( | ) |
Wraps Seek(), using SEEK_CUR
to obtain the file’s current position.
-1
on failure, with an error message logged. bool crashpad::FileSeekerInterface::SeekSet | ( | FileOffset | offset | ) |
Wraps Seek(), using SEEK_SET
, ensuring that the seek succeeded and the file is positioned as desired.
true
if the operation succeeded, false
if it failed, with an error message logged. A failure to reposition the file as desired is treated as a failure.