---
name: "gfs_closedir"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.4.1-1.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gfs_closedir"
---

# gfs\_closedir(3)

close a directory

## NAME

gfs\_closedir - close a directory

## SYNOPSIS

**#include \<gfarm/gfarm.h\>**

**char \* gfs\_closedir (GFS\_Dir** *dir***);**

## DESCRIPTION

The **gfs\_closedir()** function closes the directory stream associated with *dir*.  The directory stream descriptor *dir* is not available after this call.

## RETURN VALUES

- **NULL**

  The function terminated successfully.

- **Others**

  An error except the above occurred.  The reason is shown by its pointed strings.

## SEE ALSO

[**gfs\_opendir**(3)](/gfs_opendir/3.md), [**gfs\_readdir**(3)](/gfs_readdir/3.md)
