closedir()

close directory stream 

Function


SYNOPSIS

#include <sys/types.h>

#include <dirent.h>

int closedir(DIR *dirp);


DESCRIPTION

The closedir() function closes the directory stream that dirp refers to. The memory associated with the directory stream is released. When this function returns, the value of dirp no longer point to an accessible object of type DIR.


PARAMETERS

dirp 

Is the directory pointer to close (from opendir()).


RETURN VALUES

If successful, closedir() returns a value of zero. On failure, it returns -1 and sets errno to one of the following:

EBADF 

dirp does not refer to an open file descriptor.


CONFORMANCE

POSIX.1(1996).


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
opendir(), readdir(), rewinddir(), seekdir(), telldir()


PTC MKS Toolkit 10.3 Documentation Build 39.