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 process if _FS_LOCK option is not enabled. However this is not recommended for future compatibility.
Available when _FS_MINIMIZE <= 1.