| 19 | } |
| 20 | |
| 21 | bool utils::ReadFileToMemory(const std::wstring& file_path, std::vector<uint8_t>* out_buffer) { |
| 22 | std::ifstream file_ifstream(file_path, std::ios::binary); |
| 23 | |
| 24 | if (!file_ifstream) |
| 25 | return false; |
| 26 | |
| 27 | out_buffer->assign((std::istreambuf_iterator<char>(file_ifstream)), std::istreambuf_iterator<char>()); |
| 28 | file_ifstream.close(); |
| 29 | |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | |
| 34 | bool utils::CreateFileFromMemory(const std::wstring& desired_file_path, const char* address, size_t size) { |
nothing calls this directly
no outgoing calls
no test coverage detected