The closedir() function closes a directory handle.Closes the directory stream indicated by dir_handle. The stream must have previously been opened by opendir().
The directory handle resource previously opened with opendir(). If the directory handle is not specified, the last link opened by opendir() is assumed.