19 #ifndef _MMAP_COMMON_H
20 #define _MMAP_COMMON_H
58 while (*filter && *str)
62 if (*++filter ==
'\0')
74 else if (*filter != *str)
81 return ((*filter ==
'\0' || (*filter ==
'*' && *++filter ==
'\0')) && *str ==
'\0');
94 WIN32_FIND_DATA findFileInfo;
95 std::string directory;
97 directory = dirpath +
"/" + filter;
99 hFind = FindFirstFile(directory.c_str(), &findFileInfo);
105 if ((findFileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
106 fileList.push_back(std::string(findFileInfo.cFileName));
108 while (FindNextFile(hFind, &findFileInfo));
113 const char *p = dirpath.c_str();
114 DIR * dirp = opendir(p);
120 if ((dp = readdir(dirp)) !=
NULL)
123 fileList.push_back(std::string(dp->d_name));
Definition: PathCommon.h:41
void * HANDLE
Definition: CascPort.h:146
Definition: PathCommon.h:39
Definition: PathCommon.h:40
Definition: PathCommon.h:45
arena_t NULL
Definition: jemalloc_internal.h:624
ListFilesResult
Definition: PathCommon.h:84
Definition: MMapFactory.cpp:22
Definition: PathCommon.h:43
NavTerrain
Definition: MapDefines.h:22
Definition: PathCommon.h:87
Definition: PathCommon.h:86
Definition: PathCommon.h:46
Definition: PathCommon.h:42
ListFilesResult getDirContents(std::vector< std::string > &fileList, std::string dirpath=".", std::string filter="*")
Definition: PathCommon.h:90
Definition: PathCommon.h:44
#define INVALID_HANDLE_VALUE
Definition: CascPort.h:169
Definition: PathCommon.h:38
bool matchWildcardFilter(const char *filter, const char *str)
Definition: PathCommon.h:52