| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 1.91

 

close_dir

#include "sfldir.h"
Bool
close_dir (
    DIRST *dir)

Synopsis

Close the directory stream, and free any allocated memory. You should call this function when you are done reading a directory, or you will get memory leaks. Returns TRUE if okay, FALSE if there was an error.

Source Code - (sfldir.c)

{
    Bool
        rc;

    ASSERT (dir != NULL);

#if (defined (__UNIX__) || defined (__VMS_XOPEN) || defined (__OS2__))
    rc = (closedir (dir-> _dir_handle) == 0);

#elif (defined (_MSC_VER) && defined (WIN32))
    rc = (_findclose (dir-> _dir_handle) == 0);

#elif (defined (_MSC_VER))
    rc = TRUE;                          /*  No function to close a dir       */

#elif (defined (__TURBOC__))
    rc = TRUE;                          /*  No function to close a dir       */
#else

    rc = FALSE;                         /*  Directory access not supported   */
#endif

    return (rc);
}

| << | < | > | >> iMatix Copyright © 1996-98 iMatix