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

Method GetChildrenRecursive

Engine/source/EtCore/FileSystem/Entry.cpp:416–435  ·  view source on GitHub ↗

--------------------------------- Directory::GetChildrenRecursive Get all children that are files, including in mounted subdirectories

Source from the content-addressed store, hash-verified

414// Get all children that are files, including in mounted subdirectories
415//
416void Directory::GetChildrenRecursive(std::vector<File*>& children)
417{
418 for (Entry* child : m_pChildren)
419 {
420 switch (child->GetType())
421 {
422 case Entry::EntryType::ENTRY_DIRECTORY:
423 static_cast<Directory*>(child)->GetChildrenRecursive(children);
424 break;
425
426 case Entry::EntryType::ENTRY_FILE:
427 children.emplace_back(static_cast<File*>(child));
428 break;
429
430 default:
431 LOG("Directory::GetChildrenRecursive > Unhandled entry type: " + child->GetName(), LogLevel::Warning);
432 break;
433 }
434 }
435}
436
437//---------------------------------
438// Directory::GetMountedChild

Callers

nothing calls this directly

Calls 2

GetNameMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected