API search type: read_binary_file : String -> Io [Int] Returns a function that reads the content of a binary file when executed. This function then returns an empty vector if the file could not be read.
| 419 | // Returns a function that reads the content of a binary file when executed. |
| 420 | // This function then returns an empty vector if the file could not be read. |
| 421 | inline std::function<std::vector<std::uint8_t>()> read_binary_file( |
| 422 | const std::string& filename) |
| 423 | { |
| 424 | return [filename]() -> std::vector<std::uint8_t> { |
| 425 | return just_with_default( |
| 426 | std::vector<std::uint8_t>(), |
| 427 | read_binary_file_maybe(filename)()); |
| 428 | }; |
| 429 | } |
| 430 | |
| 431 | // API search type: read_text_file_lines_maybe : (String, Bool) -> Io (Maybe [String]) |
| 432 | // Returns a function that (when called) reads the content of a text file |
nothing calls this directly
no test coverage detected