MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / GetFileListTree

Method GetFileListTree

neo/framework/FileSystem.cpp:1645–1667  ·  view source on GitHub ↗

=============== idFileSystemLocal::GetFileListTree =============== */

Source from the content-addressed store, hash-verified

1643===============
1644*/
1645int idFileSystemLocal::GetFileListTree( const char *relativePath, const idStrList &extensions, idStrList &list, idHashIndex &hashIndex, const char* gamedir ) {
1646 int i;
1647 idStrList slash, folders( 128 );
1648 idHashIndex folderHashIndex( 1024, 128 );
1649
1650 // recurse through the subdirectories
1651 slash.Append( "/" );
1652 GetFileList( relativePath, slash, folders, folderHashIndex, true, gamedir );
1653 for ( i = 0; i < folders.Num(); i++ ) {
1654 if ( folders[i][0] == '.' ) {
1655 continue;
1656 }
1657 if ( folders[i].Icmp( relativePath ) == 0 ){
1658 continue;
1659 }
1660 GetFileListTree( folders[i], extensions, list, hashIndex, gamedir );
1661 }
1662
1663 // list files in the current directory
1664 GetFileList( relativePath, extensions, list, hashIndex, true, gamedir );
1665
1666 return list.Num();
1667}
1668
1669/*
1670===============

Callers

nothing calls this directly

Calls 4

GetFileListFunction · 0.85
IcmpMethod · 0.60
AppendMethod · 0.45
NumMethod · 0.45

Tested by

no test coverage detected