| 149 | } |
| 150 | |
| 151 | Utils::StatusWithReason FileSpec::ingest(const std::string& pathOrJson) |
| 152 | { |
| 153 | NL::json json; |
| 154 | if (Utils::isJSON(pathOrJson)) |
| 155 | { |
| 156 | auto status = Utils::parseJson(pathOrJson, json); |
| 157 | if (!status) |
| 158 | return status; |
| 159 | } |
| 160 | // assuming input is a filename |
| 161 | else |
| 162 | json = NL::json(pathOrJson); |
| 163 | |
| 164 | return m_p->parse(json); |
| 165 | } |
| 166 | |
| 167 | void FileSpec::Private::setFilePath(const std::string& u8path) |
| 168 | { |
no test coverage detected