Simple function to take out some text from a file.
| 254 | |
| 255 | // Simple function to take out some text from a file. |
| 256 | std::wstring ReadTextFile(const FilePath& filename) { |
| 257 | wchar_t contents[64]; |
| 258 | std::wifstream file; |
| 259 | file.open(filename.value().c_str()); |
| 260 | EXPECT_TRUE(file.is_open()); |
| 261 | file.getline(contents, arraysize(contents)); |
| 262 | file.close(); |
| 263 | return std::wstring(contents); |
| 264 | } |
| 265 | |
| 266 | #if defined(OS_WIN) |
| 267 | uint64_t FileTimeAsUint64(const FILETIME& ft) { |