A file reader implementation that wraps traditional system file operations on files accessed through the filesystem. More...
#include "util/file/file_reader.h"
Public Member Functions | |
| FileReader (const FileReader &)=delete | |
| FileReader & | operator= (const FileReader &)=delete |
| bool | Open (const base::FilePath &path) |
| Wraps LoggingOpenFileForRead(). | |
| void | Close () |
| Wraps CheckedCloseHandle(). | |
| FileOperationResult | Read (void *data, size_t size) override |
| Wraps ReadFile(), or provides an implementation with identical semantics. | |
| FileOffset | Seek (FileOffset offset, int whence) override |
| Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. | |
Public Member Functions inherited from crashpad::FileReaderInterface | |
| bool | ReadExactly (void *data, size_t size) |
| Wraps Read(), ensuring that the read succeeded and exactly size bytes were read. | |
Public Member Functions inherited from crashpad::FileSeekerInterface | |
| FileOffset | SeekGet () |
Wraps Seek(), using SEEK_CUR to obtain the file’s current position. | |
| bool | SeekSet (FileOffset offset) |
Wraps Seek(), using SEEK_SET, ensuring that the seek succeeded and the file is positioned as desired. | |
A file reader implementation that wraps traditional system file operations on files accessed through the filesystem.
| void crashpad::FileReader::Close | ( | ) |
Wraps CheckedCloseHandle().
| bool crashpad::FileReader::Open | ( | const base::FilePath & | path | ) |
Wraps LoggingOpenFileForRead().
true if the operation succeeded, false if it failed, with an error message logged.
|
overridevirtual |
Wraps ReadFile(), or provides an implementation with identical semantics.
0 or any positive value less than or equal to size. -1 if the operation failed, with an error message logged. Implements crashpad::FileReaderInterface.
|
overridevirtual |
Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics.
-1 on failure, with an error message logged. Implements crashpad::FileSeekerInterface.