Version 2 (modified by 7 months ago) ( diff ) | ,
---|
GetFilesInPathWithExtension 825gen2
Search for files in a directory having the specified extension
int GetFilesInPathWithExtension(const char* path, const char* ext, vector<string>& result);
Parameters
path = The path to search ext = The extension to search for
Return Value
This function returns the number of files found
Remarks
Examples
vector<string> pdfList; int pdfFileCnt = GetFilesInPathWithExtension(appDataPath.c_str(), "PDF", pdfList); if(pdfFileCnt > 0) { int n; for(auto fileName : pdfList) { printf("pdf file [%s]\n", fileName.c_str()); } }
See Also
Note:
See TracWiki
for help on using the wiki.