Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>dos_findfirst</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dos_findfirst

Usage


   #include <dos.h>
   int dos_findfirst(char *name,int attr,struct FIND *b1);

Description

   This is a recursive version of the library findfirst() call. The primary
   difference between this routine and findfirst() is that it allows
   recursion through the use of different FIND structures for each occasion
   the dos_findfirst() function is called. The arguments are:

       name    File name to locate. Usually contains wildcards.

       attr    Attribute mask to use.

       b1      FIND structure in which to place the result.

Example 

   #include <stdio.h>
   #include <dos.h>

   #include <stdlib.h>

   int main()
   {
       struct FIND ffblk;

       if (0 == dos_findfirst("*.*", 0xff, &ffblk))
           do {
               puts(ffblk.name);
           } while (0 == dos_findnext(&ffblk));
       return EXIT_SUCCESS;
   }

Return Value

   0 if file is found, else non-zero

See Also

   dos_findnext




See Also: dos_findnext

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson