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

Method Unmount

Engine/source/EtCore/FileSystem/Entry.cpp:323–343  ·  view source on GitHub ↗

--------------------------------- Directory::Unmount Unmount the directory and all subdirectories

Source from the content-addressed store, hash-verified

321// Unmount the directory and all subdirectories
322//
323void Directory::Unmount()
324{
325 if (m_pChildren.size() > 0u)
326 {
327 for (size_t idx = m_pChildren.size() - 1; idx < m_pChildren.size(); --idx)
328 {
329 if(m_pChildren[idx]->GetType() == Entry::EntryType::ENTRY_DIRECTORY)
330 {
331 if (m_pChildren[idx]->GetName() != "../" && m_pChildren[idx]->GetName() != "./")
332 {
333 static_cast<Directory*>(m_pChildren[idx])->Unmount();
334 }
335 }
336
337 delete m_pChildren[idx];
338 }
339 }
340
341 m_pChildren.clear();
342 m_IsMounted = false;
343}
344
345//---------------------------------
346// Directory::Delete

Callers 2

GetFileNameMethod · 0.80
FileSystemTest.cppFile · 0.80

Calls 2

GetNameMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected