MCPcopy Create free account
hub / github.com/comaps/comaps / SaveResumeChunks

Method SaveResumeChunks

libs/platform/http_request.cpp:188–201  ·  view source on GitHub ↗

Saves current chunks' statuses into a resume file.

Source from the content-addressed store, hash-verified

186
187 // Saves current chunks' statuses into a resume file.
188 void SaveResumeChunks()
189 {
190 try
191 {
192 // Flush writer before saving downloaded chunks.
193 m_writer->Flush();
194
195 m_strategy.SaveChunks(m_progress.m_bytesTotal, m_filePath + RESUME_FILE_EXTENSION);
196 }
197 catch (Writer::Exception const & e)
198 {
199 LOG(LWARNING, ("Can't flush writer", e.Msg()));
200 }
201 }
202
203 /// Called for each chunk by one main (GUI) thread.
204 virtual void OnFinish(long httpOrErrorCode, int64_t begRange, int64_t endRange)

Callers

nothing calls this directly

Calls 2

SaveChunksMethod · 0.80
FlushMethod · 0.45

Tested by

no test coverage detected