MCPcopy Create free account
hub / github.com/ddnet/ddnet / WriteToFile

Method WriteToFile

src/engine/shared/http.cpp:503–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503void CHttpRequest::WriteToFile(IStorage *pStorage, const char *pDest, int StorageType)
504{
505 m_WriteToMemory = false;
506 m_WriteToFile = true;
507 str_copy(m_aDest, pDest);
508 m_StorageType = StorageType;
509 if(StorageType == -2)
510 {
511 pStorage->GetBinaryPath(m_aDest, m_aDestAbsolute, sizeof(m_aDestAbsolute));
512 }
513 else
514 {
515 pStorage->GetCompletePath(StorageType, m_aDest, m_aDestAbsolute, sizeof(m_aDestAbsolute));
516 }
517 IStorage::FormatTmpPath(m_aDestAbsoluteTmp, sizeof(m_aDestAbsoluteTmp), m_aDestAbsolute);
518}
519
520void CHttpRequest::WriteToFileAndMemory(IStorage *pStorage, const char *pDest, int StorageType)
521{

Callers 1

HttpGetFileFunction · 0.80

Calls 3

GetBinaryPathMethod · 0.80
GetCompletePathMethod · 0.80
str_copyFunction · 0.50

Tested by

no test coverage detected