mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-20 09:56:07 -05:00
Add ReadFileOrDie test util function.
This fixes a compilation error; I'd left it out of the previous commit adding a sqlite-test.cc method which depends on it.
This commit is contained in:
@@ -71,6 +71,13 @@ class File {
|
||||
// ftruncate(), returning 0 on success or errno>0 on failure.
|
||||
virtual int Truncate(off_t length) = 0;
|
||||
|
||||
// read(), returning 0 on success or errno>0 on failure.
|
||||
// On success, |bytes_read| will be updated.
|
||||
virtual int Read(void *buf, size_t count, size_t *bytes_read) = 0;
|
||||
|
||||
// fstat(), returning 0 on success or errno>0 on failure.
|
||||
virtual int Stat(struct stat *buf) = 0;
|
||||
|
||||
// Write to the file, returning 0 on success or errno>0 on failure.
|
||||
// On success, |bytes_written| will be updated.
|
||||
virtual int Write(re2::StringPiece data, size_t *bytes_written) = 0;
|
||||
|
||||
Reference in New Issue
Block a user