MCPcopy Create free account
hub / github.com/caozhiyi/CppNet / GetFileHeader

Method GetFileHeader

test/sendfile/SendFileClient.cpp:77–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76private:
77 bool GetFileHeader() {
78 _file.open(_file_name, std::ios::binary | std::ios::in);
79 if (!_file.good()) {
80 return false;
81 }
82
83 sprintf(_header._name, "%s", _file_name.c_str());
84 _file.seekg(0, _file.end);
85 _header._length = _file.tellg();
86 _file.seekg(0, _file.beg);
87
88 Compute_file_md5(_file_name.c_str(), _header._md5);
89 return true;
90 }
91
92 void Send(const Handle& handle) {
93 char buf[__read_len];

Callers

nothing calls this directly

Calls 1

Compute_file_md5Function · 0.85

Tested by

no test coverage detected