* 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. */
| 868 | * @return True if the operation succeeded, False otherwise. |
| 869 | */ |
| 870 | bool 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. |