MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / save

Method save

Telegram/SourceFiles/export/export_api_wrap.cpp:344–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void ApiWrap::LoadedFileCache::save(
345 const Location &location,
346 const QString &relativePath) {
347 if (!location) {
348 return;
349 }
350 const auto key = ComputeLocationKey(location);
351 _map[key] = relativePath;
352 _list.push_back(key);
353 if (_list.size() > _limit) {
354 const auto key = _list.front();
355 _list.pop_front();
356 _map.erase(key);
357 }
358}
359
360std::optional<QString> ApiWrap::LoadedFileCache::find(
361 const Location &location) const {

Callers 3

writePreloadedFileMethod · 0.45
filePartDoneMethod · 0.45
WriteImageThumbFunction · 0.45

Calls 4

ComputeLocationKeyFunction · 0.85
frontMethod · 0.80
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected