MCPcopy Create free account
hub / github.com/amule-project/amule / GetNeededSpace

Method GetNeededSpace

src/PartFile.cpp:3772–3789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3770
3771
3772uint64 CPartFile::GetNeededSpace()
3773{
3774 try {
3775 uint64 length = m_hpartfile.GetLength();
3776
3777 if (length > GetFileSize()) {
3778 return 0; // Shouldn't happen, but just in case
3779 }
3780
3781 return GetFileSize() - length;
3782 } catch (const CIOFailureException& e) {
3783 AddDebugLogLineC(logPartFile,
3784 CFormat("Error while retrieving file-length (%s): %s")
3785 % m_PartPath % e.what());
3786 SetStatus(PS_ERROR);
3787 return 0;
3788 }
3789}
3790
3791void CPartFile::SetStatus(uint8 in)
3792{

Callers 1

CheckDiskspaceMethod · 0.80

Calls 3

CFormatClass · 0.85
whatMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected