---
name: "gfs_rmdir"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.7.20+dfsg-1.2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gfs_rmdir"
---

# gfs\_rmdir(3)

delete a directory

## NAME

gfs\_rmdir - delete a directory

## SYNOPSIS

```
#include <gfarm/gfarm.h>
```

**gfarm\_error\_t gfs\_rmdir(const char \*** *gfarm\_url***);**

## DESCRIPTION

**gfs\_rmdir()** deletes a directory whose name is the string specified by *gfarm\_url*. The directory must be empty.

## RETURN VALUES

**GFARM\_ERR\_NO\_ERROR**

The function terminated successfully.

**GFARM\_ERR\_NO\_MEMORY**

Insufficient memory was available.

**GFARM\_ERR\_PERMISSION\_DENIED**

*gfarm\_url* points outside your accessible address space.

**GFARM\_ERR\_DIRECTORY\_NOT\_EMPTY**

Directory is not empty.

**GFARM\_ERR\_NO\_SUCH\_OBJECT**

Directory does not exist.

**GFARM\_ERR\_NOT\_A\_DIRECTORY**

A component of the path prefix is not a directory.

Others

An error except the above occurred. The reason is shown by **gfarm\_error\_string**(3).
