| 79 | } |
| 80 | |
| 81 | bool file::write_file(const path &path, const void *buffer, size_t length) |
| 82 | { |
| 83 | #if OS_WIN |
| 84 | FILE *fp = _wfopen(path.c_str(), L"wb"); |
| 85 | #else |
| 86 | FILE *fp = fopen(path.c_str(), "wb"); |
| 87 | #endif |
| 88 | |
| 89 | if (fp != nullptr) |
| 90 | { |
| 91 | fwrite(buffer, 1, length, fp); |
| 92 | fclose(fp); |
| 93 | return true; |
| 94 | } |
| 95 | |
| 96 | return false; |
| 97 | } |
| 98 | |
| 99 | std::vector<path> file::read_dir(const path &dir) |
| 100 | { |
nothing calls this directly
no outgoing calls
no test coverage detected