MCPcopy Create free account
hub / github.com/ddnet/ddnet / TestCollect

Function TestCollect

src/test/test.cpp:82–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80};
81
82int TestCollect(const char *pName, int IsDir, int Unused, void *pUser)
83{
84 CTestCollectData *pData = (CTestCollectData *)pUser;
85
86 if(str_comp(pName, ".") == 0 || str_comp(pName, "..") == 0)
87 {
88 return 0;
89 }
90
91 CTestInfoPath Path;
92 Path.m_IsDirectory = IsDir;
93 str_format(Path.m_aData, sizeof(Path.m_aData), "%s/%s", pData->m_aCurrentDir, pName);
94 pData->m_pvEntries->push_back(Path);
95 if(Path.m_IsDirectory)
96 {
97 CTestCollectData DataRecursive;
98 str_copy(DataRecursive.m_aCurrentDir, Path.m_aData, sizeof(DataRecursive.m_aCurrentDir));
99 DataRecursive.m_pvEntries = pData->m_pvEntries;
100 fs_listdir(DataRecursive.m_aCurrentDir, TestCollect, 0, &DataRecursive);
101 }
102 return 0;
103}
104
105void TestDeleteTestStorageFiles(const char *pPath)
106{

Callers

nothing calls this directly

Calls 4

str_compFunction · 0.85
str_formatFunction · 0.85
fs_listdirFunction · 0.85
str_copyFunction · 0.50

Tested by

no test coverage detected