MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / resolveSearchPaths

Function resolveSearchPaths

Source/Falcor/Utils/PathResolving.cpp:64–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64ResolvedPaths resolveSearchPaths(
65 const std::vector<std::filesystem::path>& current,
66 const std::vector<std::string>& update,
67 const std::vector<std::filesystem::path>& standard,
68 EnvVarResolver envResolver
69)
70{
71 ResolvedPaths result;
72
73 for (std::string it : update)
74 {
75 if (!resolveEnvVariables(it, envResolver))
76 {
77 result.invalid.push_back(std::move(it));
78 continue;
79 }
80
81 std::vector<std::string> temp = splitString(it, ";");
82 for (std::string& it2 : temp)
83 {
84 if (it2.empty())
85 continue;
86 if (it2 == "&")
87 {
88 result.resolved.insert(result.resolved.end(), current.begin(), current.end());
89 continue;
90 }
91 if (it2 == "@")
92 {
93 result.resolved.insert(result.resolved.end(), standard.begin(), standard.end());
94 continue;
95 }
96 std::filesystem::path path = std::filesystem::weakly_canonical(it2);
97 if (path.is_absolute())
98 result.resolved.push_back(std::move(path));
99 else
100 result.invalid.push_back(std::move(it2));
101 }
102 }
103
104 return result;
105}
106
107std::filesystem::path resolvePath(
108 const std::vector<std::filesystem::path>& searchPaths,

Callers 2

updateSearchPathsMethod · 0.85
CPU_TESTFunction · 0.85

Calls 7

resolveEnvVariablesFunction · 0.85
splitStringFunction · 0.85
push_backMethod · 0.45
emptyMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by 1

CPU_TESTFunction · 0.68