MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / SaveFile

Method SaveFile

src/tablet/file_receiver.cc:91–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void FileReceiver::SaveFile() {
92 std::string full_path = path_ + file_name_;
93 std::string tmp_file_path = full_path + ".tmp";
94 if (::fedb::base::IsExists(full_path)) {
95 std::string backup_file = full_path + "." + ::fedb::base::GetNowTime();
96 rename(full_path.c_str(), backup_file.c_str());
97 }
98 rename(tmp_file_path.c_str(), full_path.c_str());
99 PDLOG(INFO, "file %s received. size %lu", full_path.c_str(), size_);
100}
101
102} // namespace tablet
103} // namespace fedb

Callers 1

SendDataMethod · 0.80

Calls 2

IsExistsFunction · 0.85
GetNowTimeFunction · 0.85

Tested by

no test coverage detected