MCPcopy Create free account
hub / github.com/ByConity/ByConity / copyFile

Function copyFile

src/Disks/IDisk.cpp:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void copyFile(IDisk & from_disk, const String & from_path, IDisk & to_disk, const String & to_path)
28{
29 LOG_DEBUG(&Poco::Logger::get("IDisk"), "Copying from {} (path: {}) {} to {} (path: {}) {}.",
30 from_disk.getName(), from_disk.getPath(), from_path, to_disk.getName(), to_disk.getPath(), to_path);
31
32 auto in = from_disk.readFile(from_path);
33 auto out = to_disk.writeFile(to_path);
34 copyData(*in, *out);
35 out->finalize();
36}
37
38
39using ResultsCollector = std::vector<std::future<void>>;

Callers 2

asyncCopyFunction · 0.85
copyFilesMethod · 0.85

Calls 7

getFunction · 0.50
copyDataFunction · 0.50
getNameMethod · 0.45
getPathMethod · 0.45
readFileMethod · 0.45
writeFileMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected