MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / getDataLocation

Method getDataLocation

src/CLI2.cpp:223–232  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Look for CONFIG data.location and initialize a Path object. Static method.

Source from the content-addressed store, hash-verified

221// Look for CONFIG data.location and initialize a Path object.
222// Static method.
223bool CLI2::getDataLocation(int argc, const char** argv, Path& data) {
224 const char* value = getValue(argc, argv, "rc.data.location");
225 if (value == nullptr) {
226 std::string location = Context::getContext().config.get("data.location");
227 if (location != "") data = location;
228 return false;
229 }
230 data = Directory(value);
231 return true;
232}
233
234////////////////////////////////////////////////////////////////////////////////
235// Static method.

Callers

nothing calls this directly

Calls 2

getValueFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected