1libssh2_sftp_symlink_ex(3)      libssh2 manual      libssh2_sftp_symlink_ex(3)
2
3
4

NAME

6       libssh2_sftp_symlink_ex - read or set a symbolic link
7

SYNOPSIS

9       #include <libssh2.h> #include <libssh2_sftp.h>
10
11       int   libssh2_sftp_symlink_ex(LIBSSH2_SFTP  *sftp,  const  char  *path,
12       unsigned int path_len,  char  *target,  unsigned  int  target_len,  int
13       link_type);
14
15       int  libssh2_sftp_symlink(LIBSSH2_SFTP  *sftp,  const  char *path, char
16       *target);
17
18       int libssh2_sftp_readlink(LIBSSH2_SFTP *sftp, const  char  *path,  char
19       *target, unsigned int target_len);
20
21       int  libssh2_sftp_realpath(LIBSSH2_SFTP  *sftp,  const char *path, char
22       *target, unsigned int target_len);
23
24

DESCRIPTION

26       sftp - SFTP instance as returned by libssh2_sftp_init(3)
27
28       path - Remote filesystem object to create a symlink from or resolve.
29
30       path_len - Length of the name of the remote filesystem object to create
31       a symlink from or resolve.
32
33       target -
34       LIBSSH2_SFTP_SYMLINK: Remote filesystem object to link to.
35       LIBSSH2_SFTP_READLINK:  Pre-allocated  buffer to resolve symlink target
36       into.
37       LIBSSH2_SFTP_REALPATH: Pre-allocated buffer to resolve realpath  target
38       into.
39
40       target_len - Length of the name of the remote filesystem target object.
41
42       link_type  -  One  of  the  three  previously mentioned constants which
43       determines the resulting behavior of this function.
44
45       libssh2_sftp_symlink(3) : Create a symbolic link between two filesystem
46       objects.
47       libssh2_sftp_readlink(3) : Resolve a symbolic link filesystem object to
48       its next target.
49       libssh2_sftp_realpath(3) : Resolve a complex,  relative,  or  symlinked
50       filepath to its effective target.
51
52

RETURN VALUE

54       Return   0  on  success  or  negative  on  failure.   It  returns  LIB‐
55       SSH2_ERROR_EAGAIN  when  it   would   otherwise   block.   While   LIB‐
56       SSH2_ERROR_EAGAIN  is  a negative number, it isn't really a failure per
57       se.
58
59

ERRORS

61       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
62
63       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
64
65       LIBSSH2_ERROR_SOCKET_TIMEOUT -
66
67       LIBSSH2_ERROR_SFTP_PROTOCOL - An invalid  SFTP  protocol  response  was
68       received  on the socket, or an SFTP operation caused an errorcode to be
69       returned by the server.
70
71

SEE ALSO

73       libssh2_sftp_init(3)
74
75
76
77libssh2 0.15                      1 Jun 2007        libssh2_sftp_symlink_ex(3)
Impressum