MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / GetParentPath

Method GetParentPath

PathCopyCopy/src/PathCopyCopyContextMenuExt.cpp:712–726  ·  view source on GitHub ↗

Returns the path of the parent directory of all selected files. @return Parent directory path.

Source from the content-addressed store, hash-verified

710// @return Parent directory path.
711//
712std::wstring CPathCopyCopyContextMenuExt::GetParentPath() const
713{
714 std::wstring parentPath;
715
716 // Extract the parent path of the first file. We'll assume that all
717 // files have the same parent. This might not be strictly true in all
718 // cases (for example, in a custom shell view) but we're only using it
719 // for validation purposes, so it's good enough.
720 if (!m_vFiles.empty()) {
721 parentPath = m_vFiles.front();
722 PCC::PluginUtils::ExtractFolderFromPath(parentPath);
723 }
724
725 return parentPath;
726}
727
728//
729// Adds a new item to the given menu (either the main contextual menu or

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected