Returns a list of a path's parents, in reverse order. So if, for instance, is called with "C:\Program Files\Path Copy Copy\PCC32.dll", would return C:\Program Files\Path Copy Copy C:\Program Files C:\ // @param p_Path Path to enumerate the parents of. @return List of path's parents.
| 122 | // @return List of path's parents. |
| 123 | // |
| 124 | std::vector<std::wstring> PluginUtils::EnumerateParents(std::wstring p_Path) |
| 125 | { |
| 126 | std::vector<std::wstring> vParents; |
| 127 | for (;;) { |
| 128 | const auto prevPath{p_Path}; |
| 129 | const auto hasParent = ExtractFolderFromPath(p_Path); |
| 130 | if (!hasParent || p_Path == prevPath) { |
| 131 | break; |
| 132 | } |
| 133 | vParents.emplace_back(p_Path); |
| 134 | } |
| 135 | return vParents; |
| 136 | } |
| 137 | |
| 138 | // |
| 139 | // If the provided path or one of its parents points to a symbolic link, |
nothing calls this directly
no outgoing calls
no test coverage detected