# CloseDirectory

Closes a directory.

### Synopsis

`void CloseDirectory( Directory *dir )`

### Description

This function closes a directory that was previously opened using `OpenDirectoryItem()` or `OpenDirectoryPath()`. All resources get released.

### Arguments

dir
  A pointer to the directory structure for the directory to close.

### Implementation

Folio call implemented in file folio V20.

### Associated Files

directoryfunctions.h, filesystem.lib

### See Also

``OpenDirectoryItem`(), OpenDirectoryPath(), ReadDirectory()`