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

Method remove

Engine/source/platformPOSIX/posixVolume.cpp:207–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207bool PosixFileSystem::remove(const Path& path)
208{
209 // Should probably check for outstanding files or directory objects.
210 String file = buildFileName(_volume,path);
211
212 struct stat info;
213 int error = stat(file.c_str(),&info);
214 if (error < 0)
215 return false;
216
217 if (S_ISDIR(info.st_mode))
218 return !rmdir(file);
219
220 return !unlink(file);
221}
222
223bool PosixFileSystem::rename(const Path& from,const Path& to)
224{

Callers

nothing calls this directly

Calls 3

buildFileNameFunction · 0.85
statClass · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected