API search type: write_binary_file : (String, [Int]) -> Io Bool Returns a function that (when called) writes content into a binary file, replacing it if it already exists.
| 13996 | // Returns a function that (when called) writes content into a binary file, |
| 13997 | // replacing it if it already exists. |
| 13998 | inline std::function<bool()> write_binary_file(const std::string& filename, |
| 13999 | const std::vector<uint8_t>& content) |
| 14000 | { |
| 14001 | return [filename, content]() -> bool { |
| 14002 | std::ofstream file(filename, std::ios::binary); |
| 14003 | file.write(reinterpret_cast<const char*>(&content[0]), |
| 14004 | static_cast<std::streamsize>(content.size())); |
| 14005 | return file.good(); |
| 14006 | }; |
| 14007 | } |
| 14008 | |
| 14009 | // API search type: write_text_file_lines : (String, [String], Bool) -> Io Bool |
| 14010 | // Returns a function that (when called) writes lines into a text file, |
nothing calls this directly
no outgoing calls
no test coverage detected