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

NAME

6       libssh2_sftp_rename_ex - rename an SFTP file
7

SYNOPSIS

9       #include <libssh2.h> #include <libssh2_sftp.h>
10
11       int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_file‐
12       name, unsigned  int  source_filename_len,  const  char  *dest_filename,
13       unsigned int dest_filename_len, long flags);
14
15       int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_file‐
16       name, const char *dest_filename);
17
18

DESCRIPTION

20       sftp - SFTP instance as returned by libssh2_sftp_init(3)
21
22       sourcefile - Path and name of the existing filesystem entry
23
24       sourcefile_len - Length of the path and name of the existing filesystem
25       entry
26
27       destfile - Path and name of the target filesystem entry
28
29       destfile_len  -  Length  of  the path and name of the target filesystem
30       entry
31
32       flags - Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants.
33
34       Rename a filesystem object on the remote filesystem. The  semantics  of
35       this  command typically include the ability to move a filesystem object
36       between   folders   and/or   filesystem    mounts.    If    the    LIB‐
37       SSH2_SFTP_RENAME_OVERWRITE  flag  is  not  set  and  the destfile entry
38       already exists, the operation will fail. Use of  the  other  two  flags
39       indicate  a  preference  (but  not a requirement) for the remote end to
40       perform an atomic rename operation and/or  using  native  system  calls
41       when possible.
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_rename_ex(3)
Impressum