MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / RenameOver

Function RenameOver

src/util.cpp:571–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569#endif
570
571bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
572{
573#ifdef WIN32
574 return MoveFileExA(src.string().c_str(), dest.string().c_str(),
575 MOVEFILE_REPLACE_EXISTING) != 0;
576#else
577 int rc = std::rename(src.string().c_str(), dest.string().c_str());
578 return (rc == 0);
579#endif /* WIN32 */
580}
581
582/**
583 * Ignores exceptions thrown by Boost's create_directory if the requested directory exists.

Callers 2

ThreadImportFunction · 0.85
WriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected