/ Published in: C

filter hidden files/directorys while using readdir() in the windows environment
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
DIR *pDir = opendir(pathname); if(!pDir){ return false; } dirent *pDirEntry; struct stat entryStat; while((pDirEntry = readdir(pDir))){ // filter hidden files and / or subdirectorys if(pDir->dd_dta.attrib & _A_HIDDEN){ continue; } }
Comments
