# FS_CloseDirectory

## Syntax

    #include <nitro/fs.h>

    BOOL FS_CloseDirectory(FSFile *dir);

## Arguments

dir | Handle of a directory that was opened using `FS_OpenDirectory()`.

## Return Values

TRUE if the directory was closed properly. FALSE otherwise. In case of failure, the error details can be obtained using `FS_GetResultCode()`.

## Description

This function closes an open directory.

## Note

- This function cannot be called from the interrupt handler (IRQ mode). Also note that in some cases processing may not end if interrupts are left prohibited.

## See Also

`FS_OpenDirectory FS_ReadDirectory`

## Revision History

2007/09/18 Initial version.

CONFIDENTIAL