Hello
Just begin by scanning the root directory you want to check by a scandir function. It will complete an array of "struct dirent" entries.
Then you just have to walk through this array and check the d_type var of each structure. If this is DT_DIR, this is not a file, just a directory.
Check this out at : http://www.skip.informatik.gu.se/~nacka/glibc/glibc_248.html#SEC255
Kind regards
--
Seb
|