Mail Archives: djgpp/1998/08/09/13:51:33
Hi,
I have to read the file names from certain directory, I am using:
|#include <dirent.h>
|struct dirent *readdir(DIR *dir);
|
|DIR *d = opendir( argv[1] );
|
|while ((de = readdir(d)))
| cout >> de->d_name;
|
|closedir ( d );
but it does not read from other subdirectories, just the directory that I
tell him and not its subdirectories.
from the "LibC Reference" I understood that setting "__opendir_flags"
variable to "__OPENDIR_FIND_HIDDEN", the "opendir ( ... )" would seek for
files thru subdirectories, I added to my program:
extern int __opendir_flags;
__opendir_flags = __OPENDIR_FIND_HIDDEN;
but nothing changes, all is the same than before.
can you help me please ?
Jorge Iván Meza Martínez
jimeza AT usa DOT net
http://members.xoom.com/THP
- Raw text -