Closes a specified directory.
#include <dirent.h> int closedir ( DIR *dirp);
Specifies the directory to be closed. For information about the structure, see DIR.
If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:
The closedir function closes the directory specified by the dirp parameter and frees the memory allocated by the opendir function. All open directories are automatically closed when an NLMâ„¢ application is terminated.