1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
long hFile = 0;
int fileCount = 0;
string tempPath = SavePath;
struct _finddata_t fileinfo;
if ((hFile = _findfirst(tempPath.append("*").c_str(), &fileinfo)) != 0)
{
while ( _findnext(hFile, &fileinfo) == 0)
{
if (strcmp(fileinfo.name, ".") == 0 || strcmp(fileinfo.name, "..") == 0)
continue;
if (fileinfo.attrib & _A_SUBDIR)
fileCount += 1;
}
}
|
近期评论