libssh2_sftp_unlink_ex(3)
β¨ libssh2_sftp_unlink_ex β¨
okay so bestie, welcome to the libssh2 manual, page libssh2_sftp_unlink_ex(3) π
this one is short and sweet and it's giving "delete that file, bestie" energy ποΈβ¨
πΈ NAME πΈ
libssh2_sftp_unlink_ex β unlink an SFTP file π«Ά
π¦ SYNOPSIS π¦
#include <libssh2.h>
#include <libssh2_sftp.h>
int
libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, const char *filename, unsigned int filename_len);
int
libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename);
two icons, one job π the _ex one lets you pass the length yourself, the other one figures it out. slay.
π DESCRIPTION π
sftpβ the SFTP instance, as returned bylibssh2_sftp_init(3)πfilenameβ path and name of the existing filesystem entry πfilename_lenβ length of the path and name of the existing filesystem entry π
and what does it do? it unlinks (deletes) a file from the remote filesystem. that's it. that's the whole vibe. poof, gone, no cap πβ¨
fr fr bestie, "unlink" means delete. once it's gone it's gone, so maybe do a vibe check on that path before you send it π
π RETURN VALUE π
returns 0 on success, or a negative number on failure π and heads up: it returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. and likeβ¦ yes, LIBSSH2_ERROR_EAGAIN is a negative number, but it's not really a failure per se β it's just the "not right now, try again later" of it all, iykyk π«Ά
π₯ ERRORS π₯
LIBSSH2_ERROR_ALLOCβ an internal memory allocation call failed πLIBSSH2_ERROR_SOCKET_SENDβ unable to send data on socket π‘LIBSSH2_ERROR_SOCKET_TIMEOUTβ β° (that's the whole note, bestie, the original said nothing more and we don't make things up here β)LIBSSH2_ERROR_SFTP_PROTOCOLβ an invalid SFTP protocol response was received on the socket, or an SFTP operation caused an errorcode to be returned by the server π¨
π SEE ALSO π
libssh2_sftp_init(3)π
mwah π this page comes to you from the libssh2 0.15 era, dated 1 Jun 2007 β vintage icon behavior, honestly π thanks for reading, go delete something responsibly ππ¦β¨
π¦ where this page comes from
- alpine 3.22: libssh2-doc 1.11.1-r3 Β· BSD-3-Clause
- alpine 3.23: libssh2-doc 1.11.1-r4 Β· BSD-3-Clause
- alpine 3.24: libssh2-doc 1.11.1-r4 Β· BSD-3-Clause
- arch rolling: libssh2 1.11.1-7 Β· BSD-3-Clause
- debian trixie: libssh2-1-dev 1.11.1-1+deb13u1 Β· BSD3
- debian trixie: libssh2-1-dev 1.11.1-1+deb13u2 Β· BSD3
- epel 10: libssh2-docs 1.11.1-9.el10_3 Β· BSD-3-Clause
- epel 9: libssh2-docs 1.11.1-9.el9 Β· BSD-3-Clause
- fedora 43: libssh2-docs 1.11.1-4.fc43 Β· BSD-3-Clause
- fedora 43: libssh2-docs 1.11.1-9.fc43 Β· BSD-3-Clause
- fedora 44: libssh2-docs 1.11.1-5.fc44 Β· BSD-3-Clause
- fedora 44: libssh2-docs 1.11.1-9.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- ubuntu questing: libssh2-1-dev 1.11.1-1build1
- ubuntu questing: libssh2-1-dev 1.11.1-1ubuntu0.25.10.2
- ubuntu resolute: libssh2-1-dev 1.11.1-1build2 Β· BSD3
- ubuntu resolute: libssh2-1-dev 1.11.1-1ubuntu0.26.04.4 Β· BSD3
- ubuntu stonking: libssh2-1-dev 1.11.1-6 Β· BSD3
- π the page's license: BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms