MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / TexturePackScreen_FilterFiles

Function TexturePackScreen_FilterFiles

src/Menus.c:1594–1604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1592}
1593
1594static void TexturePackScreen_FilterFiles(const cc_string* path, void* obj, int isDirectory) {
1595 static const cc_string zip = String_FromConst(".zip");
1596 cc_string relPath = *path;
1597
1598 if (isDirectory) {
1599 Directory_Enum(path, obj, TexturePackScreen_FilterFiles);
1600 } else if (String_CaselessEnds(path, &zip)) {
1601 Utils_UNSAFE_TrimFirstDirectory(&relPath);
1602 StringsBuffer_Add((struct StringsBuffer*)obj, &relPath);
1603 }
1604}
1605
1606static void TexturePackScreen_LoadEntries(struct ListScreen* s) {
1607 static const cc_string path = String_FromConst("texpacks");

Callers

nothing calls this directly

Calls 4

String_CaselessEndsFunction · 0.85
StringsBuffer_AddFunction · 0.85
Directory_EnumFunction · 0.70

Tested by

no test coverage detected