--------------------------------- Directory::Unmount Unmount the directory and all subdirectories
| 321 | // Unmount the directory and all subdirectories |
| 322 | // |
| 323 | void 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 |
no test coverage detected