MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / RenameFile

Function RenameFile

FEXHeaderUtils/FEXHeaderUtils/Filesystem.h:54–57  ·  view source on GitHub ↗

* @brief Renames a file and overwrites if it already exists. * * @return No error on rename. */

Source from the content-addressed store, hash-verified

52 * @return No error on rename.
53 */
54[[nodiscard]]
55inline std::error_code RenameFile(const fextl::string& From, const fextl::string& To) {
56 return rename(From.c_str(), To.c_str()) == 0 ? std::error_code {} : std::make_error_code(std::errc::io_error);
57}
58
59#ifndef _WIN32
60inline bool ExistsAt(int FD, const fextl::string& Path) {

Callers 1

ShutdownFunction · 0.85

Calls 1

renameFunction · 0.85

Tested by

no test coverage detected