Class foreign_storage::MultiFileReader¶
-
class
MultiFileReader
: public foreign_storage::FileReader¶ Subclassed by foreign_storage::LocalMultiFileReader
Public Functions
-
MultiFileReader
(const std::string &file_path, const import_export::CopyParams ©_params)¶
-
MultiFileReader
(const std::string &file_path, const import_export::CopyParams ©_params, const rapidjson::Value &value)¶
-
size_t
getRemainingSize
()¶ - Return
size of the remaining content to be read
-
bool
isRemainingSizeKnown
()¶ - Return
if remaining size is known
-
size_t
read
(void *buffer, size_t max_size)¶ Read up to max_size bytes from archive into buffer starting starting from the end of the last read
- Return
number of bytes actually read
- Parameters
buffer
: - buffer to load intomax_size
: - maximum number of bytes to read into the buffer
-
size_t
readRegion
(void *buffer, size_t offset, size_t size)¶ Read up to max_size bytes from archive, starting at given offset isScanFinished() must return true to use readRegion
- Return
number of bytes actually read
- Parameters
buffer
: - buffer to load intooffset
: - starting point into the archive to readsize
: - maximum number of bytes to read into the buffer
-
bool
isScanFinished
()¶ - Return
true if the entire file has been read
-
void
serialize
(rapidjson::Value &value, rapidjson::Document::AllocatorType &allocator) const¶ Serialize internal state to given json object This Json will later be used to restore the reader state through a constructor must be called when isScanFinished() is true
- Parameters
value
: - json object to store needed state to this function can store any needed data or noneallocator
: - allocator to use for json contruction
-
FirstLineByFilePath
getFirstLineForEachFile
() const¶ Returns a map containing the first line for each file that will be read.
-
bool
isEndOfLastFile
()¶ Returns a boolean indicating whether the reader is at the end of the last file that was read.
-