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

Method GetPosition

src/CFile.cpp:474–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472
473
474uint64 CFile::GetPosition() const
475{
476 MULE_VALIDATE_STATE(IsOpened(), "Cannot get position in closed file.");
477
478 std::lock_guard<std::recursive_mutex> lock(m_mutex);
479
480 // Reported position must include any pending buffered bytes.
481 // Easiest is to drain so TELL_FD's answer is authoritative.
482 DrainWriteBuffer();
483
484 sint64 pos = TELL_FD(m_fd);
485 if (pos == wxInvalidOffset) {
486 throw CSeekFailureException(wxString("Failed to retrieve position in file: ") + wxSysErrorMsg());
487 }
488
489 return pos;
490}
491
492
493uint64 CFile::GetLength() const

Callers 15

InitGuiMethod · 0.45
OnRMButtonMethod · 0.45
OnMouseButtonMethod · 0.45
ReadRecoveryDataMethod · 0.45
LoadHashSetMethod · 0.45
OnInfoListContextMenuMethod · 0.45
OnNMRclickChatTabMethod · 0.45
OnNMRclickDLtabMethod · 0.45
ProcessPacketMethod · 0.45
ProcessExtPacketMethod · 0.45

Calls 2

wxStringClass · 0.70

Tested by 12

setUpMethod · 0.36
setUpMethod · 0.36
runMethod · 0.36
runMethod · 0.36
runMethod · 0.36
runMethod · 0.36
runMethod · 0.36
runMethod · 0.36
TESTFunction · 0.36
toStringFunction · 0.36
ReadTagPtrListFunction · 0.36
check_single_kad_tagFunction · 0.36