| Version 5 (modified by , 8 months ago) ( diff ) |
|---|
GetFilesInPathWithExtension
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/cardinal.gif)