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

Method deleteDirectory

Engine/source/platform/platformFileIO.cpp:149–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147//-----------------------------------------------------------------------------
148
149bool Platform::deleteDirectory(const char* pPath)
150{
151 // Sanity!
152 AssertFatal(pPath != NULL, "Cannot delete directory that is NULL.");
153
154 // Is the path a file?
155 if (Platform::isFile(pPath))
156 {
157 // Yes, so warn.
158 Con::warnf("Cannot delete directory '%s' as it specifies a file.", pPath);
159 return false;
160 }
161
162 // Expand module location.
163 char pathBuffer[1024];
164 Con::expandPath(pathBuffer, sizeof(pathBuffer), pPath, NULL, true);
165
166 // Delete directory recursively.
167 return deleteDirectoryRecusrive(pathBuffer);
168}
169
170//-----------------------------------------------------------------------------
171

Callers

nothing calls this directly

Calls 3

expandPathFunction · 0.85
deleteDirectoryRecusriveFunction · 0.85
warnfFunction · 0.50

Tested by

no test coverage detected