MCPcopy Create free account
hub / github.com/Rectus/openxr-steamvr-passthrough / EnsurePathForFile

Function EnsurePathForFile

shared/pathutil.cpp:73–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73bool EnsurePathForFile(const std::string_view& filePath, std::error_code* errorCode)
74{
75 std::filesystem::path dirPath((char8_t const*)filePath.data());
76 dirPath.remove_filename();
77
78 std::error_code retCode;
79
80 if(std::filesystem::create_directories(dirPath, retCode) || retCode.value() == 0)
81 {
82 return true;
83 }
84
85 if (errorCode != nullptr)
86 {
87 *errorCode = retCode;
88 }
89
90 return false;
91}

Callers 1

UpdateConfigFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected