MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / CreateParentFolderIfNeeded

Function CreateParentFolderIfNeeded

Tools/Tool.cpp:154–168  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

152
153 //---------------------------------------------------------------------
154 void CreateParentFolderIfNeeded(const std::filesystem::path& path)
155 {
156 if (path.has_parent_path())
157 {
158 auto parentPath = path.parent_path();
159 std::error_code er;
160
161 std::filesystem::create_directories(parentPath, er);
162 if (er)
163 {
164 THROW(L"Error when creating folder " << parentPath.wstring()
165 << L" Error code:" << er.value());
166 }
167 }
168 }
169
170 //---------------------------------------------------------------------
171 bool FileExists(const std::filesystem::path& path)

Callers 2

ExportMethod · 0.85
SerializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected