The f_closedir function closes an open directory.
FRESULT f_closedir ( DIR* dp /* [IN] Pointer to the directory object */ );
The f_closedir function closes an open directory object. After the function succeeded, the directory object is no longer valid and it can be discarded.
Note that the directory object can also be discarded without this procedure when option FF_FS_LOCK is not enabled. However this is not recommended for future compatibility.
Available when FF_FS_MINIMIZE <= 1.