| 350 | } |
| 351 | |
| 352 | int validateNamedFile(const std::string& filepath, bool warningsAsErrors, bool GLTFBasisU, std::function<void(const ValidationReport&)> callback) { |
| 353 | try { |
| 354 | ValidationContextIOStream ctx{warningsAsErrors, GLTFBasisU, std::move(callback), filepath}; |
| 355 | return ctx.validate(); |
| 356 | } catch (const FatalValidationError&) { |
| 357 | return +rc::INVALID_FILE; |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | int validateStdioStream(FILE* file, const std::string& filepath, bool warningsAsErrors, bool GLTFBasisU, std::function<void(const ValidationReport&)> callback) { |
| 362 | try { |