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

Function GetItemFileNames

Src/DirActions.cpp:1064–1072  ·  view source on GitHub ↗

* @brief Get the file names on both sides for specified item. * @note Return empty strings if item is special item. */

Source from the content-addressed store, hash-verified

1062 * @note Return empty strings if item is special item.
1063 */
1064void GetItemFileNames(const CDiffContext& ctxt, const DIFFITEM &di, String& strLeft, String& strRight)
1065{
1066 const String leftrelpath = paths::ConcatPath(di.diffFileInfo[0].path, di.diffFileInfo[0].filename);
1067 const String rightrelpath = paths::ConcatPath(di.diffFileInfo[1].path, di.diffFileInfo[1].filename);
1068 const String & leftpath = ctxt.GetPath(0);
1069 const String & rightpath = ctxt.GetPath(1);
1070 strLeft = paths::ConcatPath(leftpath, leftrelpath);
1071 strRight = paths::ConcatPath(rightpath, rightrelpath);
1072}
1073
1074String GetItemFileName(const CDiffContext& ctxt, const DIFFITEM &di, int index)
1075{

Callers 5

GetOpenOneItemFunction · 0.85
GetOpenTwoItemsFunction · 0.85
GetOpenThreeItemsFunction · 0.85
DoItemRenameFunction · 0.85
GetItemFileNamesMethod · 0.85

Calls 4

ConcatPathFunction · 0.85
GetPathMethod · 0.45
GetCompareDirsMethod · 0.45
SetPathMethod · 0.45

Tested by

no test coverage detected