libssh2_sftp_symlink(3)

πŸ“¦
version 1.11.1 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

ok so real talk, we're in the libssh2 manual, section 3, and this page is literally about one tiny macro. it's giving "short but iconic" πŸ’…


🌸 NAME 🌸

libssh2_sftp_symlink β€” it's a convenience macro for libssh2_sftp_symlink_ex(3). that's it, that's the whole thing, no cap 🫢


✨ SYNOPSIS ✨

#include <libssh2.h>
#include <libssh2_sftp.h>

#define libssh2_sftp_symlink(sftp, orig, linkpath) \
    libssh2_sftp_symlink_ex((sftp), (orig), strlen(orig), (linkpath), \
                            strlen(linkpath), LIBSSH2_SFTP_SYMLINK)

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•: this is a macro, not a real function, and it lives in a public libssh2 header file. it exists purely to be a glow-up wrapper around the actual workhorse function, libssh2_sftp_symlink_ex(3).

the way it eats: you hand it sftp, orig, and linkpath, and it quietly does the strlen() math on both orig and linkpath for you, then calls through with LIBSSH2_SFTP_SYMLINK. so you get the vibes of a simple two-string call without typing all that out yourself. main character convenience energy, honestly πŸ‘‘


πŸŽ€ RETURN VALUE πŸŽ€

no thoughts of its own, bestie β€” go read libssh2_sftp_symlink_ex(3) for that. it's the one holding the receipts.


πŸ’€ ERRORS πŸ’€

same deal, fr fr. errors are libssh2_sftp_symlink_ex(3)'s whole personality. check over there.


πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ that's the page. this gem came out of libssh2 1.2.4, dated 20 Feb 2010 β€” yes she's vintage, yes she still slays. take care of her, go make some symlinks, and remember: read the _ex page for literally everything important πŸ§šπŸ’œ