Get all the file names in a specified folder that match a specified file specification.
int GetFileNames( StringArray & saFileNames, LPCSTR lpcszPath, LPCSTR lpcszFileSpec, DWORD dwCtrl )
Returns zero for success and non-zero for error.
EX1
void GetFileNames_ex1() { StringArray saFiles; string strPath = GetAppPath(true) + "OriginC\\System\\"; int nErr = GetFileNames(saFiles, strPath, "*.h", GFIF_FILE_RECURSIVE | GFIF_STRIP_START_PATH); out_str("Files find in this folder :"); for ( int ii = 0; ii < saFiles.GetSize(); ii++ ) { printf("%s\n", saFiles[ii]); } }
origin.h