Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.cpp
void EnumerateFilesRecursive(AZ::IO::Path currentPath, ZipDir::FileEntryTree* currentTree, AZStd::vector<AZ::IO::Path>& fileList)
    {
        // Drill down directories first...
        for (auto dirIter = currentTree->GetDirBegin(); dirIter != currentTree->GetDirEnd(); ++dirIter)
        {
            if (ZipDir::FileEntryTree* subTree = currentTree->GetDirEntry(dirIter);
                subTree != nullptr)
            {
                EnumerateFilesRecursive(currentPath / currentTree->GetDirName(dirIter), subTree, fileList);
            }
        }

        // Then enumerate the files in current directory...
        for (auto fileIter = currentTree->GetFileBegin(); fileIter != currentTree->GetFileEnd(); ++fileIter)
        {
            fileList.emplace_back(currentPath / currentTree->GetFileName(fileIter));
        }
    }
//////////////////////////////////////////////////////////////////////////
// Helper for 'ListAllFiles' to recursively traverse the FileEntryTree and gather all the files
Helper for 'ListAllFiles' to recursively traverse the FileEntryTree and gather all the files
Helper for ' ListAllFiles ' to recursively traverse the FileEntryTree and gather all the files
void EnumerateFilesRecursive(AZ::IO::Path currentPath, ZipDir::FileEntryTree* currentTree, AZStd::vector<AZ::IO::Path>& fileList)
    {
        for (auto dirIter = currentTree->GetDirBegin(); dirIter != currentTree->GetDirEnd(); ++dirIter)
        {
            if (ZipDir::FileEntryTree* subTree = currentTree->GetDirEntry(dirIter);
                subTree != nullptr)
            {
                EnumerateFilesRecursive(currentPath / currentTree->GetDirName(dirIter), subTree, fileList);
            }
        }
        for (auto fileIter = currentTree->GetFileBegin(); fileIter != currentTree->GetFileEnd(); ++fileIter)
        {
            fileList.emplace_back(currentPath / currentTree->GetFileName(fileIter));
        }
    }
void EnumerateFilesRecursive ( AZ :: IO :: Path currentPath , ZipDir :: FileEntryTree * currentTree , AZStd :: vector < AZ :: IO :: Path > & fileList ) { for ( auto dirIter = currentTree -> GetDirBegin ( ) ; dirIter != currentTree -> GetDirEnd ( ) ; ++ dirIter ) { if ( ZipDir :: FileEntryTree * subTree = currentTree -> GetDirEntry ( dirIter ) ; subTree != nullptr ) { EnumerateFilesRecursive ( currentPath / currentTree -> GetDirName ( dirIter ) , subTree , fileList ) ; } } for ( auto fileIter = currentTree -> GetFileBegin ( ) ; fileIter != currentTree -> GetFileEnd ( ) ; ++ fileIter ) { fileList . emplace_back ( currentPath / currentTree -> GetFileName ( fileIter ) ) ; } }
Helper for 'ListAllFiles' to recursively traverse the FileEntryTree and gather all the files
Helper for ' ListAllFiles ' to recursively traverse the FileEntryTree and gather all the files
// Drill down directories first... // Then enumerate the files in current directory...