MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / dFileRename

Function dFileRename

Engine/source/platformWin32/winFileio.cpp:80–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80bool dFileRename(const char *oldName, const char *newName)
81{
82 AssertFatal( oldName != NULL && newName != NULL, "dFileRename - NULL file name" );
83
84 TempAlloc< TCHAR > oldf( dStrlen( oldName ) + 1 );
85 TempAlloc< TCHAR > newf( dStrlen( newName ) + 1 );
86
87#ifdef UNICODE
88 convertUTF8toUTF16N( oldName, oldf, oldf.size );
89 convertUTF8toUTF16N( newName, newf, newf.size );
90#else
91 dStrcpy(oldf, oldName, oldf.size);
92 dStrcpy(newf, newName, newf.size);
93#endif
94 backslash(oldf);
95 backslash(newf);
96
97 return MoveFile( oldf, newf );
98}
99
100bool dFileTouch(const char * name)
101{

Callers 1

copyModuleMethod · 0.50

Calls 4

convertUTF8toUTF16NFunction · 0.85
dStrcpyFunction · 0.85
backslashFunction · 0.85
dStrlenFunction · 0.50

Tested by

no test coverage detected