MCPcopy Create free account
hub / github.com/WinMerge/winmerge / Packing

Method Packing

Src/FileTransform.cpp:526–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526bool PackingInfo::Packing(int target, const String& srcFilepath, const String& dstFilepath, const std::vector<int>& handlerSubcodes, const std::vector<StringView>& variables) const
527{
528 String csTempFileName = srcFilepath;
529 if (!pack(target, csTempFileName, dstFilepath, handlerSubcodes, variables))
530 return false;
531 try
532 {
533 if (!paths::IsURL(dstFilepath))
534 {
535 TFile file1(csTempFileName);
536 file1.copyTo(dstFilepath);
537 if (srcFilepath != csTempFileName)
538 file1.remove();
539 }
540 return true;
541 }
542 catch (Poco::Exception& e)
543 {
544 DWORD dwErrCode = GetLastError();
545 RootLogger::Error(e.displayText());
546 SetLastError(dwErrCode);
547 return false;
548 }
549}
550
551bool PackingInfo::Unpacking(int target, std::vector<int>* handlerSubcodes, String& filepath, const String& filteredText, const std::vector<StringView>& variables)
552{

Callers 4

SaveFileMethod · 0.80
SaveToFileMethod · 0.80
DoFileSaveMethod · 0.80
DoFileSaveAsMethod · 0.80

Calls 6

packFunction · 0.85
IsURLFunction · 0.85
ErrorFunction · 0.85
displayTextMethod · 0.80
copyToMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected