persist/include/persist/core/storage/file_storage.hpp
/**
 * Write given ByteBuffer to file starting at specifed offset.
 *
 * @param file opened file stream object
 * @param buffer reference to the ByteBuffer from which data is stored
 * @param offset offset within the file from where to start writing
 */
Write given ByteBuffer to file starting at specifed offset.
@param file opened file stream object
@param buffer reference to the ByteBuffer from which data is stored
@param offset offset within the file from where to start writing
Write given ByteBuffer to file starting at specifed offset . @param file opened file stream object @param buffer reference to the ByteBuffer from which data is stored @param offset offset within the file from where to start writing
static void write(std::fstream &file, ByteBuffer &buffer,
                  std::streampos offset) {
  std::streampos original = file.tellg();
  file.seekg(offset);
  file.write(reinterpret_cast<char *>(&buffer[0]), buffer.size());
  file.seekg(original);
}
static void write ( std :: fstream & file , ByteBuffer & buffer , std :: streampos offset ) { std :: streampos original = file . tellg ( ) ; file . seekg ( offset ) ; file . write ( reinterpret_cast < char * > ( & buffer [ 0 ] ) , buffer . size ( ) ) ; file . seekg ( original ) ; }
Write given ByteBuffer to file starting at specifed offset.
Write given ByteBuffer to file starting at specifed offset .
// Get current position of the stream cursor before moving // Place the moved cursor back to its original postion