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

NAME

6       libssh2_scp_send_ex - Send a file via SCP
7

SYNOPSIS

9       #include <libssh2.h>
10
11       LIBSSH2_CHANNEL  *  libssh2_scp_send_ex(LIBSSH2_SESSION *session, const
12       char *path, int mode, size_t size, long mtime, long atime);
13
14       LIBSSH2_CHANNEL * libssh2_scp_send_ex(LIBSSH2_SESSION  *session,  const
15       char *path, int mode, size_t size);
16
17

DESCRIPTION

19       session - Session instance as returned by libssh2_session_init(3)
20
21       path - Full path and filename of file to transfer
22
23       mode - File access mode to create file with
24
25       size - Size of file being transmitted (Must be known ahead of time pre‐
26       cisely)
27
28       mtime - mtime to assign to file being created
29
30       atime - atime to assign to file being created (Set this  and  mtime  to
31       zero to instruct remote host to use current time).
32
33       Send a file to the remote host via SCP. This function acts as a wrapper
34       calling libssh2_channel_open_session(3) , libssh2_channel_exec(3) , and
35       negotiating rcp protocol handshakes.
36
37

RETURN VALUE

39       Pointer  to  a  newly  allocated  LIBSSH2_CHANNEL  instance, or NULL on
40       errors.
41
42

ERRORS

44       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
45
46       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
47
48       LIBSSH2_ERROR_SCP_PROTOCOL -
49
50       LIBSSH2_ERROR_EAGAIN - Marked for non-blocking I/O but the  call  would
51       block.
52
53

SEE ALSO

55       libssh2_channel_open_session(3) libssh2_channel_exec(3)
56
57
58
59libssh2 0.15                      1 Jun 2007            libssh2_scp_send_ex(3)
Impressum