Message-ID: <37E16EE6.392549E9@unb.ca> From: Endlisnis X-Mailer: Mozilla 4.61 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Program Crash References: <37D71D7D DOT A31105CD AT uswest DOT net> <7r7rcc$gs7$1 AT antares DOT lu DOT erisoft DOT se> <37D87266 DOT 29BC6CF5 AT uswest DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 17 Sep 1999 01:24:27 GMT NNTP-Posting-Host: 207.179.152.29 X-Trace: news21.bellglobal.com 937531467 207.179.152.29 (Thu, 16 Sep 1999 21:24:27 EDT) NNTP-Posting-Date: Thu, 16 Sep 1999 21:24:27 EDT Organization: Sympatico Lines: 46 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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 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