---
name: "gfs_unlink"
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_unlink"
---

# gfs\_unlink(3)

delete a file

## NAME

gfs\_unlink - delete a file

## SYNOPSIS

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

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

## DESCRIPTION

**gfs\_unlink()** deletes the file whose name is the string specified by *gfarm\_url*.

## RETURN VALUES

**GFARM\_ERR\_NO\_ERROR**

The function terminated successfully.

**GFARM\_ERR\_NO\_MEMORY**

Insufficient memory was available.

**GFARM\_ERR\_AUTHENTICATION**

User authentication failed when connecting to [gfmd(8)](/gfmd/8.md).

**GFARM\_ERR\_PERMISSION\_DENIED**

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

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

*gfarm\_url* 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).
