* @brief Renames a file and overwrites if it already exists. * * @return No error on rename. */
| 52 | * @return No error on rename. |
| 53 | */ |
| 54 | [[nodiscard]] |
| 55 | inline 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 |
| 60 | inline bool ExistsAt(int FD, const fextl::string& Path) { |