/////////////////////////////////////////////////////////////////////////// Look for CONFIG data.location and initialize a Path object. Static method.
| 221 | // Look for CONFIG data.location and initialize a Path object. |
| 222 | // Static method. |
| 223 | bool 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. |