| 64 | } |
| 65 | |
| 66 | void BackupWriterDefault::copyDataToFile(const String & path_in_backup, const CreateReadBufferFunction & create_read_buffer, UInt64 start_pos, UInt64 length) |
| 67 | { |
| 68 | auto read_buffer = create_read_buffer(); |
| 69 | |
| 70 | if (start_pos) |
| 71 | read_buffer->seek(start_pos, SEEK_SET); |
| 72 | |
| 73 | auto write_buffer = writeFile(path_in_backup); |
| 74 | |
| 75 | copyData(*read_buffer, *write_buffer, length); |
| 76 | write_buffer->finalize(); |
| 77 | } |
| 78 | |
| 79 | void BackupWriterDefault::copyFileFromDisk( |
| 80 | const String & path_in_backup, DiskPtr src_disk, const String & src_path, bool copy_encrypted, UInt64 start_pos, UInt64 length) |