closedir closedir DIRHANDLE This function closes a directory opened by opendir. See the examples under readdir.