MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / copyDataToFile

Method copyDataToFile

src/Backups/BackupIO_Default.cpp:66–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void 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
79void BackupWriterDefault::copyFileFromDisk(
80 const String & path_in_backup, DiskPtr src_disk, const String & src_path, bool copy_encrypted, UInt64 start_pos, UInt64 length)

Callers

nothing calls this directly

Calls 4

writeFileFunction · 0.85
copyDataFunction · 0.85
seekMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected