Building the libssh2 and including a script to build it as UB
[printdrop.git] / libssh2 / share / man / man3 / libssh2_sftp_symlink_ex.3
1 .\" $Id: libssh2_sftp_symlink_ex.3,v 1.1 2007/06/14 16:33:38 jehousley Exp $
2 .\"
3 .TH libssh2_sftp_symlink_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
4 .SH NAME
5 libssh2_sftp_symlink_ex - read or set a symbolic link
6 .SH SYNOPSIS
7 #include <libssh2.h>
8 #include <libssh2_sftp.h>
9
10 int
11 libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, char *target, unsigned int target_len, int link_type);
12
13 int
14 libssh2_sftp_symlink(LIBSSH2_SFTP *sftp, const char *path, char *target);
15
16 int
17 libssh2_sftp_readlink(LIBSSH2_SFTP *sftp, const char *path, char *target, unsigned int target_len);
18
19 int
20 libssh2_sftp_realpath(LIBSSH2_SFTP *sftp, const char *path, char *target, unsigned int target_len);
21
22 .SH DESCRIPTION
23 \fIsftp\fP - SFTP instance as returned by
24 .BR libssh2_sftp_init(3)
25
26 \fIpath\fP - Remote filesystem object to create a symlink from or resolve.
27
28 \fIpath_len\fP - Length of the name of the remote filesystem object to
29 create a symlink from or resolve.
30
31 \fItarget\fP -
32 .br
33 \fBLIBSSH2_SFTP_SYMLINK\fP: Remote filesystem object to link to.
34 .br
35 \fBLIBSSH2_SFTP_READLINK\fP: Pre-allocated buffer to resolve symlink target into.
36 .br
37 \fBLIBSSH2_SFTP_REALPATH\fP: Pre-allocated buffer to resolve realpath target into.
38
39 \fItarget_len\fP - Length of the name of the remote filesystem target object.
40
41 \fIlink_type\fP - One of the three previously mentioned constants which
42 determines the resulting behavior of this function.
43
44 .BR libssh2_sftp_symlink(3)
45 : Create a symbolic link between two filesystem objects.
46 .br
47 .BR libssh2_sftp_readlink(3)
48 : Resolve a symbolic link filesystem object to its next target.
49 .br
50 .BR libssh2_sftp_realpath(3)
51 : Resolve a complex, relative, or symlinked filepath to its effective target.
52
53 .SH RETURN VALUE
54 Return 0 on success or negative on failure. It returns
55 LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
56 LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
57
58 .SH ERRORS
59 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
60
61 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
62
63 \fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
64
65 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
66 received on the socket, or an SFTP operation caused an errorcode to
67 be returned by the server.
68
69 .SH SEE ALSO
70 .BR libssh2_sftp_init(3)