13#include "common/lang/fstream.h"
14#include "common/lang/memory.h"
15#include "common/lang/sstream.h"
16#include "common/lang/string.h"
17#include "common/sys/rc.h"
18#include "common/lang/mutex.h"
73 string read_pos(uint32_t pos, uint32_t size);
A utility class for reading files in an efficient manner.
Definition: ob_file_reader.h:32
string read_pos(uint32_t pos, uint32_t size)
Reads a portion of the file from a specified position.
Definition: ob_file_reader.cpp:22
static unique_ptr< ObFileReader > create_file_reader(const string &filename)
Creates a new ObFileReader instance.
Definition: ob_file_reader.cpp:40
ObFileReader(const string &filename)
Constructs an ObFileReader object with the specified file name.
Definition: ob_file_reader.h:42
uint32_t file_size()
Returns the size of the file.
Definition: ob_file_reader.cpp:35
int fd_
The file descriptor for the currently opened file.
Definition: ob_file_reader.h:111
void close_file()
Closes the file if it is currently open.
Definition: ob_file_reader.cpp:61
string filename_
The name of the file to be read.
Definition: ob_file_reader.h:103
RC open_file()
Opens the file for reading.
Definition: ob_file_reader.cpp:50