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

NAME

6       libssh2_sftp_stat_ex - rename a file
7

SYNOPSIS

9       #include <libssh2.h> #include <libssh2_sftp.h>
10
11       int libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned
12       int path_len, int stat_type, LIBSSH2_SFTP_ATTRIBUTES *attrs);
13
14       int  libssh2_sftp_stat(LIBSSH2_SFTP  *sftp,  const  char  *path,   LIB‐
15       SSH2_SFTP_ATTRIBUTES *attrs);
16
17       int  libssh2_sftp_lstat(LIBSSH2_SFTP  *sftp,  const  char  *path,  LIB‐
18       SSH2_SFTP_ATTRIBUTES *attrs);
19
20       int libssh2_sftp_setstat(LIBSSH2_SFTP *sftp,  const  char  *path,  LIB‐
21       SSH2_SFTP_ATTRIBUTES *attrs);
22
23

DESCRIPTION

25       sftp - SFTP instance as returned by libssh2_sftp_init(3)
26
27       path - Remote filesystem object to stat/lstat/setstat.
28
29       path_len  -  Lenght  of  the  name  of  the remote filesystem object to
30       stat/lstat/setstat.
31
32       stat_type - One of the three constants  specifying  the  type  of  stat
33       operation to perform.
34
35       attrs  -  Pointer  to  attribute structure to set file metadata from or
36       into depending on the value of stat_type.
37
38       Get or Set statbuf type data on a remote filesystem object.  When  get‐
39       ting statbuf data, libssh2_sftp_stat(3) will follow all symlinks, while
40       libssh2_sftp_lstat(3) will return data about  the  object  encountered,
41       even if that object happens to be a symlink.
42
43

RETURN VALUE

45       Return   0  on  success  or  negative  on  failure.   It  returns  LIB‐
46       SSH2_ERROR_EAGAIN  when  it   would   otherwise   block.   While   LIB‐
47       SSH2_ERROR_EAGAIN  is  a negative number, it isn't really a failure per
48       se.
49
50

ERRORS

52       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
53
54       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
55
56       LIBSSH2_ERROR_SOCKET_TIMEOUT -
57
58       LIBSSH2_ERROR_SFTP_PROTOCOL - An invalid  SFTP  protocol  response  was
59       received  on the socket, or an SFTP operation caused an errorcode to be
60       returned by the server.
61
62

SEE ALSO

64       libssh2_sftp_init(3)
65
66
67
68libssh2 0.15                      1 Jun 2007           libssh2_sftp_stat_ex(3)
Impressum