MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / moveFile

Function moveFile

src/Engine/CrossPlatform.cpp:870–877  ·  view source on GitHub ↗

* Moves a file from one path to another, * replacing any existing file. * @param src Source path. * @param dest Destination path. * @return True if the operation succeeded, False otherwise. */

Source from the content-addressed store, hash-verified

868 * @return True if the operation succeeded, False otherwise.
869 */
870bool moveFile(const std::string &src, const std::string &dest)
871{
872#ifdef _WIN32
873 return (MoveFileExA(src.c_str(), dest.c_str(), MOVEFILE_REPLACE_EXISTING) != 0);
874#else
875 return (rename(src.c_str(), dest.c_str()) == 0);
876#endif
877}
878
879/**
880 * Notifies the user that maybe he should have a look.

Callers 2

saveGameMethod · 0.85
initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected