cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

libssh2_sftp_symlink_ex.3 (2794B)


      1.TH libssh2_sftp_symlink_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
      2.SH NAME
      3libssh2_sftp_symlink_ex - read or set a symbolic link
      4.SH SYNOPSIS
      5.nf
      6#include <libssh2.h>
      7#include <libssh2_sftp.h>
      8
      9int
     10libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path,
     11                        unsigned int path_len, char *target,
     12                        unsigned int target_len, int link_type);
     13.fi
     14.SH DESCRIPTION
     15Create a symlink or read out symlink information from the remote side.
     16
     17\fIsftp\fP - SFTP instance as returned by
     18.BR libssh2_sftp_init(3)
     19
     20\fIpath\fP - Remote filesystem object to create a symlink from or resolve.
     21
     22\fIpath_len\fP - Length of the name of the remote filesystem object to
     23create a symlink from or resolve.
     24
     25\fItarget\fP - a pointer to a buffer. The buffer has different uses depending
     26what the \fIlink_type\fP argument is set to.
     27.br
     28\fBLIBSSH2_SFTP_SYMLINK\fP: Remote filesystem object to link to.
     29.br
     30\fBLIBSSH2_SFTP_READLINK\fP: Pre-allocated buffer to resolve symlink target
     31into.
     32.br
     33\fBLIBSSH2_SFTP_REALPATH\fP: Pre-allocated buffer to resolve realpath target
     34into.
     35
     36\fItarget_len\fP - Length of the name of the remote filesystem target object.
     37
     38\fIlink_type\fP - One of the three previously mentioned constants which
     39determines the resulting behavior of this function.
     40
     41These are convenience macros:
     42
     43.BR libssh2_sftp_symlink(3)
     44: Create a symbolic link between two filesystem objects.
     45.br
     46.BR libssh2_sftp_readlink(3)
     47: Resolve a symbolic link filesystem object to its next target.
     48.br
     49.BR libssh2_sftp_realpath(3)
     50: Resolve a complex, relative, or symlinked filepath to its effective target.
     51.SH RETURN VALUE
     52When using LIBSSH2_SFTP_SYMLINK, this function returns 0 on success or negative
     53on failure.
     54
     55When using LIBSSH2_SFTP_READLINK or LIBSSH2_SFTP_REALPATH, it returns the
     56number of bytes it copied to the target buffer (not including the terminating
     57zero) or negative on failure.
     58
     59It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
     60LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
     61
     62From 1.2.8, LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if the given 'target'
     63buffer is too small to fit the requested object name.
     64.SH BUG
     65Passing in a too small buffer when receiving data only results in libssh2
     661.2.7 or earlier to not copy the entire data amount, and it is not possible
     67for the application to tell when it happens!
     68.SH ERRORS
     69\fILIBSSH2_ERROR_ALLOC\fP -  An internal memory allocation call failed.
     70
     71\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
     72
     73\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
     74
     75\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
     76received on the socket, or an SFTP operation caused an errorcode to
     77be returned by the server.
     78.SH SEE ALSO
     79.BR libssh2_sftp_init(3)