---
name: "rfio_readlink"
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_readlink"
---

# rfio\_readlink(3)

get the content of a symbolic link

## NAME

rfio\_readlink - get the content of a symbolic link

## SYNOPSIS

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

**int rfio\_readlink (const char \****path***,** **char \****buf***,** **int** *length***)**

## DESCRIPTION

**rfio\_readlink** gets the content of the symbolic link identified by *path*.

*buf* content is not null terminated.\
 Symbolic link content can be truncated to *length* if *buf* is too small.

## RETURN VALUE

This routine returns the count of bytes placed in *buf* if the operation was successful or -1 if the operation failed. In the latter case, **serrno** is set appropriately.

## ERRORS

- **ENOENT**

  *path* does not exist.

- **ENOMEM**

  Insufficient memory.

- **EACCES**

  Search permission is denied on a component of the  *path* prefix.

- **EFAULT**

  *path* or *buf* is a NULL pointer.

- **ENOTDIR**

  A component of the  *path* prefix is not a directory.

- **EINVAL**

  *path* is not a symbolic link or *length* is not positive.

- **ENAMETOOLONG**

  The length of *path* exceeds **CA\_MAXPATHLEN** or the length of a path component exceeds **CA\_MAXNAMELEN**.

- **SENOSHOST**

  Host unknown.

- **SENOSSERV**

  Service unknown.

- **SECOMERR**

  Communication error.

- **SEOPNOTSUP**

  Not supported on Windows.

## SEE ALSO

**[Castor\_limits(4)](/Castor_limits/4.md)**, **[rfio\_symlink(3)](/rfio_symlink/3.md)**, **[rfio\_unlink(3)](/rfio_unlink/3.md)**

## AUTHOR

**LCG Grid Deployment** Team
