Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <io.h>
    int _findclose( long handle );

Description:
    The _findclose function closes the directory of filenames established by
    a call to the  _findfirst function.  The handle argument was returned by
    the  _findfirst function.

Returns:
    If successful, _findclose returns 0 otherwise, _findclose and returns -1
    and sets  errno to one of the following values:

    Constant     Meaning

ENOENT
    No matching files


Example:
    #include <stdio.h>
    #include <io.h>

    void main()
      {
        struct _finddata_t  fileinfo;
        long                handle;
        int                 rc;

        /* Display name and size of "*.c" files */
        handle = _findfirst( "*.c", &fileinfo );
        rc = handle;
        while( rc != -1 ) {
          printf( "%14s %10ld\n", fileinfo.name,
                                  fileinfo.size );
          rc = _findnext( handle, &fileinfo );
        }
        _findclose( handle );
      }

Classification:
    DOS

Systems:
    DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    _dos_find Functions, _findfirst, _findnext, closedir, opendir, readdir

See Also:

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