| 324 | } |
| 325 | |
| 326 | std::vector<DocumentChunk> DocumentProcessor::process_path(const std::string& path) { |
| 327 | if (fs::is_regular_file(path)) |
| 328 | return process_file(path); |
| 329 | if (fs::is_directory(path)) |
| 330 | return process_directory(path); |
| 331 | fprintf(stderr, "[DOC] Path not found: %s\n", path.c_str()); |
| 332 | return {}; |
| 333 | } |
| 334 | |
| 335 | std::vector<DocumentChunk> DocumentProcessor::process_directory(const std::string& dir_path) { |
| 336 | std::vector<DocumentChunk> all_chunks; |