---
name: "rfio_closedir"
section: "3"
platform: "linux"
package: "libdpm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/rfio_closedir"
---

# rfio\_closedir(3)

close directory opened by rfio\_opendir

## NAME

rfio\_closedir - close directory opened by **rfio\_opendir**

## SYNOPSIS

**#include \<sys/types.h\>**\
 **#include "rfio\_api.h"**

**int rfio\_closedir (RDIR \****dirp***);**

## DESCRIPTION

**rfio\_closedir** closes the directory opened by **rfio\_opendir** and associated with the **RDIR** structure pointed by *dirp*.

- *dirp*

  specifies the pointer value returned by **rfio\_opendir**.

## RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, **serrno** is set appropriately.

## ERRORS

- **EBADF**

  File descriptor in DIR structure is invalid.

- **SENOSHOST**

  Host unknown.

- **SENOSSERV**

  Service unknown.

- **SETIMEDOUT**

  Timed out.

- **SEBADVERSION**

  Version ID mismatch.

- **SECOMERR**

  Communication error.

## SEE ALSO

**[rfio\_opendir(3)](/rfio_opendir/3.md)**, **[rfio\_readdir(3)](/rfio_readdir/3.md)**, **[rfio\_rewinddir(3)](/rfio_rewinddir/3.md)**

## AUTHOR

**LCG Grid Deployment** Team
