MCPcopy Create free account
hub / github.com/LUX-Core/lux / RenameOver

Function RenameOver

src/util.cpp:662–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660#endif
661
662bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
663{
664#ifdef WIN32
665 return MoveFileExA(src.string().c_str(), dest.string().c_str(),
666 MOVEFILE_REPLACE_EXISTING) != 0;
667#else
668 int rc = std::rename(src.string().c_str(), dest.string().c_str());
669 return (rc == 0);
670#endif /* WIN32 */
671}
672
673/**
674 * 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