Synopsis

#include <dirent.h>

int closedir(DIR *dirp);

Description

closedir closes directory and frees the structure associated with dirp pointer.

Return value

Returns the value 0 upon successful completion, otherwise the value -1 is returned.

Errors