| 110 | } |
| 111 | |
| 112 | bool SaveFile(const char *name, const char *buf, size_t len, bool binary) { |
| 113 | std::ofstream ofs(name, binary ? std::ofstream::binary : std::ofstream::out); |
| 114 | if (!ofs.is_open()) return false; |
| 115 | ofs.write(buf, len); |
| 116 | return !ofs.bad(); |
| 117 | } |
| 118 | |
| 119 | // We internally store paths in posix format ('/'). Paths supplied |
| 120 | // by the user should go through PosixPath to ensure correct behavior |
no test coverage detected