private: void GetAllFormatFiles(string path, vector& files, string format) {//文件句柄 //long hFile = 0;//会出错//long long hFile = 0;
intptr_t hFile = 0;//文件信息
struct _finddata_t fileinfo;
string p;
hFile = _findfirst(p.assign(path).append( format).c_str(), &fileinfo);
if (hFile != -1){
do{
if ((fileinfo.attrib & _A_SUBDIR)){
if (strcmp(fileinfo.name, ".") != 0 && strcmp(fileinfo.name, "..") != 0){
//files.push_back(p.assign(path).append("\\").append(fileinfo.name) );
files.push_back(p.assign(path).append("\\").append(fileinfo.name));
//GetAllFormatFiles(p.assign(path).append("\\").append(fileinfo.name), files, format);
//cout
}
}else{
cout
}
//int k = _findnext(hFile, &fileinfo);
} while (_findnext(hFile, &fileinfo) == 0);
_findclose(hFile);
}
}
领取专属 10元无门槛券
私享最新 技术干货