Mail Archives: djgpp/1999/09/16/21:53:41
Josh Reed wrote:
> Well if I really wanted to find something I could use findutils or dir /s
> for that matter. Its not finding something that I am worried about, it is
> how can I write the code; how does that work? If somebody else has already
> done it, that doesn't mean I can't, does it? Or did I miss something.
Is this what you were looking for? (The info files document all functions
available)
Syntax
------
#include <ftw.h>
int ftw(const char *dir,
int (*func)(const char *path, struct stat *stbuf, int flag),
int depth);
Description
-----------
This function recursively descends the directory hierarchy which starts
with DIR. For each file in the hierarchy, `ftw' calls the user-defined
function FUNC which is passed a pointer to a `NULL'-terminated
character array in PATH holding the full pathname of the file, a
pointer to a `stat' structure (stat.) STBUF with a filesystem
information about that file, and an integer FLAG. Possible values of
FLAG are:
`FTW_F'
This is a regular file.
`FTW_D'
This is a directory.
--
(\/) Endlisnis (\/)
s257m AT unb DOT ca
Endlisnis AT HotMail DOT com
ICQ: 32959047
- Raw text -