MCPcopy Create free account
hub / github.com/Illation/ETEngine / Delete

Method Delete

Engine/source/EtCore/FileSystem/Entry.cpp:247–273  ·  view source on GitHub ↗

--------------------------------- File::Delete Delete the file from the disk

Source from the content-addressed store, hash-verified

245// Delete the file from the disk
246//
247bool File::Delete()
248{
249 if (m_IsOpen)
250 {
251 Close();
252 }
253
254 if(m_IsOpen)
255 {
256 LOG("Couldn't delete file because it failed to close", Error);
257 return false;
258 }
259
260 std::string path = GetPath()+m_Filename;
261 if(FILE_BASE::DeleteFile( path.c_str() ))
262 {
263 if(m_Parent)
264 {
265 m_Parent->RemoveChild( this );
266 }
267
268 delete this;
269 return true;
270 }
271
272 return false;
273}
274
275
276//======================

Callers 2

CookCompiledPackageFunction · 0.80
FileSystemTest.cppFile · 0.80

Calls 3

RemoveChildMethod · 0.80
GetNameMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected