mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 10:00:16 +02:00
FHU: Add RenameFile helper
This commit is contained in:
1 parent
60fe987e09
commit
8fb7e8d80e
1 file changed
+12
@@ -200,6 +200,18 @@ namespace FHU::Filesystem {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Renames a file and overwrites if it already exists.
|
||||
*
|
||||
* @param From
|
||||
* @param To
|
||||
*
|
||||
* @return True if the rename occured, False otherwise.
|
||||
*/
|
||||
inline bool RenameFile(const fextl::string &From, const fextl::string &To) {
|
||||
return rename(From.c_str(), To.c_str()) == 0;
|
||||
}
|
||||
|
||||
inline fextl::string LexicallyNormal(const fextl::string &Path) {
|
||||
const auto PathSize = Path.size();
|
||||
|
||||
|
||||
Reference in new issue
Block a user