Utility function to get file size
| 444 | |
| 445 | // Utility function to get file size |
| 446 | size_t get_file_size(const std::string& filepath) { |
| 447 | std::ifstream file(filepath, std::ios::binary); |
| 448 | if (!file) return 0; |
| 449 | file.seekg(0, std::ios::end); |
| 450 | size_t file_size = file.tellg(); |
| 451 | file.close(); |
| 452 | return file_size; |
| 453 | } |
| 454 | |
| 455 | // Function to generate tokens filename based on input file and size |
| 456 | std::string generate_tokens_filename(const std::string& input_file, size_t max_bytes) { |
no test coverage detected