Changes between Initial Version and Version 1 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/File/GetFilesInPathWithExtension


Ignore:
Timestamp:
05/17/24 12:04:59 (6 months ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/File/GetFilesInPathWithExtension

    v1 v1  
     1= GetFilesInPathWithExtension =
     2Search for files in a directory having the specified extension
     3
     4{{{
     5int GetFilesInPathWithExtension(const char* path, const char* ext, vector<string>& result);
     6}}}
     7
     8== Parameters ==
     9
     10path = The path to search
     11ext = The extension to search for
     12
     13== Return Value ==
     14
     15This function returns the number of files found
     16
     17== Remarks ==
     18
     19
     20== Examples ==
     21
     22{{{
     23vector<string> pdfList;
     24int pdfFileCnt = GetFilesInPathWithExtension(appDataPath.c_str(), "PDF", pdfList);
     25if(pdfFileCnt > 0) {
     26  int n;
     27  for(auto fileName : pdfList) {
     28    printf("pdf file [%s]\n", fileName.c_str());
     29  }
     30}
     31
     32
     33
     34}}}
     35
     36
     37== See Also ==
     38
     39
     40