| 271 | } |
| 272 | |
| 273 | int ReplaceFileUtf8(const std::string& source, const std::string& target) { |
| 274 | #ifdef _WIN32 |
| 275 | return ReplaceFileW(internal::WideFromUtf8(target).c_str(), |
| 276 | internal::WideFromUtf8(source).c_str(), nullptr, 0, |
| 277 | nullptr, nullptr) |
| 278 | ? 0 |
| 279 | : -1; |
| 280 | #else |
| 281 | return rename(source.c_str(), target.c_str()); |
| 282 | #endif |
| 283 | } |
| 284 | |
| 285 | int RemoveFileUtf8(const std::string& fileName) { |
| 286 | #ifdef _WIN32 |
no test coverage detected