MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / ReplaceFileUtf8

Function ReplaceFileUtf8

src/tools/PlatformIO.cpp:273–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273int 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
285int RemoveFileUtf8(const std::string& fileName) {
286#ifdef _WIN32

Callers 1

ConvertFileFunction · 0.85

Calls 1

WideFromUtf8Function · 0.50

Tested by

no test coverage detected