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

Function dFileRename

Engine/source/platformPOSIX/POSIXFileio.cpp:436–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436bool dFileRename(const char *oldName, const char *newName)
437{
438 AssertFatal( oldName != NULL && newName != NULL, "dFileRename - NULL file name" );
439
440 // only modify files in home directory
441 TempAlloc<char> oldPrefPathName(MaxPath);
442 TempAlloc<char> newPrefPathName(MaxPath);
443 MungePath(oldPrefPathName, MaxPath, oldName, GetPrefDir());
444 MungePath(newPrefPathName, MaxPath, newName, GetPrefDir());
445
446 return rename(oldPrefPathName, newPrefPathName) == 0;
447}
448
449//-----------------------------------------------------------------------------
450// Constructors & Destructor

Callers

nothing calls this directly

Calls 2

MungePathFunction · 0.85
GetPrefDirFunction · 0.85

Tested by

no test coverage detected