---
name: "libssh2_sftp_realpath"
section: "3"
platform: "linux"
package: "libssh2"
version: "1.11.1-7"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libssh2_sftp_realpath"
---

# libssh2\_sftp\_realpath(3)

convenience macro for libssh2\_sftp\_symlink\_ex(3)

## NAME

libssh2\_sftp\_realpath - convenience macro for *[libssh2\_sftp\_symlink\_ex(3)](/libssh2_sftp_symlink_ex/3.md)*

## SYNOPSIS

```
#include <libssh2.h>
#include <libssh2_sftp.h>
#define libssh2_sftp_realpath(sftp, path, target, maxlen) \
    libssh2_sftp_symlink_ex((sftp), (path), strlen(path), \
                            (target), (maxlen), \
                            LIBSSH2_SFTP_REALPATH)
```

## DESCRIPTION

This is a macro defined in a public libssh2 header file that is using the underlying function *[libssh2\_sftp\_symlink\_ex(3)](/libssh2_sftp_symlink_ex/3.md)*.

## RETURN VALUE

See *[libssh2\_sftp\_symlink\_ex(3)](/libssh2_sftp_symlink_ex/3.md)*

## ERRORS

See *[libssh2\_sftp\_symlink\_ex(3)](/libssh2_sftp_symlink_ex/3.md)*

## SEE ALSO

**[libssh2\_sftp\_symlink\_ex(3)](/libssh2_sftp_symlink_ex/3.md)**
