| 14 | namespace FileUtil |
| 15 | { |
| 16 | void readDirectory(const char* dir, const char* ext, FileList& fileList) |
| 17 | { |
| 18 | char searchStr[TFE_MAX_PATH]; |
| 19 | _finddata_t fileInfo; |
| 20 | |
| 21 | sprintf(searchStr, "%s*.%s", dir, ext); |
| 22 | intptr_t hFile = _findfirst(searchStr, &fileInfo); |
| 23 | if (hFile != -1) |
| 24 | { |
| 25 | do |
| 26 | { |
| 27 | fileList.push_back( string(fileInfo.name) ); |
| 28 | } while ( _findnext(hFile, &fileInfo) == 0 ); |
| 29 | _findclose(hFile); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | void readSubdirectories(const char* dir, FileList& dirList) |
| 34 | { |
no test coverage detected