| 135 | } |
| 136 | |
| 137 | bool LoadFile(std::wstring const& path, std::vector<uint8_t>& body) |
| 138 | { |
| 139 | std::ifstream f(path, std::ios::in | std::ios::binary); |
| 140 | if (f.good()) { |
| 141 | f.seekg(0, std::ios::end); |
| 142 | auto size = f.tellg(); |
| 143 | f.seekg(0, std::ios::beg); |
| 144 | |
| 145 | body.resize(size); |
| 146 | f.read(reinterpret_cast<char*>(body.data()), size); |
| 147 | return f.good(); |
| 148 | } |
| 149 | |
| 150 | return false; |
| 151 | } |
| 152 | |
| 153 | bool LoadFile(std::wstring const& path, std::string& body) |
| 154 | { |
no test coverage detected