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

Method Save

src/CanceledFileList.cpp:88–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87
88void CCanceledFileList::Save()
89{
90 CFile file(thePrefs::GetConfigDir() + m_filename, CFile::write);
91 if (!file.IsOpened()) {
92 return;
93 }
94
95 try {
96 file.WriteUInt8(CANCELEDFILE_VERSION);
97 file.WriteUInt32(m_canceledFileList.size());
98
99 CanceledFileList::iterator it = m_canceledFileList.begin();
100 for (; it != m_canceledFileList.end(); ++it) {
101 file.Write(it->GetHash(), 16);
102 }
103 } catch (const CIOFailureException& e) {
104 AddLogLineC(CFormat(_("Error while saving %s file: %s")) % m_filename % e.what());
105 }
106}
107
108
109bool CCanceledFileList::IsCanceledFile(const CMD4Hash& hash) const

Callers

nothing calls this directly

Calls 11

GetConfigDirFunction · 0.85
CFormatClass · 0.85
WriteUInt8Method · 0.80
WriteUInt32Method · 0.80
whatMethod · 0.80
IsOpenedMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
WriteMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected