MCPcopy Create free account
hub / github.com/dhbloo/rapfi / getModelFullPath

Function getModelFullPath

Rapfi/command/command.cpp:140–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140std::filesystem::path getModelFullPath(std::filesystem::path modelPath)
141{
142 // First try to open from current working directory
143 if (std::filesystem::exists(modelPath)) {
144 return modelPath;
145 }
146
147 // If not succeeded, try to open from config directory if path is relative
148 if (modelPath.is_relative()) {
149 auto modelPathinBinaryDir = CommandLine::binaryDirectory / modelPath;
150 if (std::filesystem::exists(modelPathinBinaryDir))
151 return modelPathinBinaryDir;
152 }
153
154 return modelPath;
155}
156
157bool loadModelFromFile(std::filesystem::path modelPath)
158{

Callers 2

readEvaluatorMethod · 0.85
loadModelFromFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected