1libssh2_scp_send_ex(3) libssh2 manual libssh2_scp_send_ex(3)
2
3
4
6 libssh2_scp_send_ex - Send a file via SCP
7
9 #include <libssh2.h>
10
11 LIBSSH2_CHANNEL *
12 libssh2_scp_send_ex(LIBSSH2_SESSION *session, const char *path, int mode,
13 size_t size, long mtime, long atime);
14
16 This function has been deemed deprecated since libssh2 1.2.6. See lib‐
17 ssh2_scp_send64(3).
18
19 session - Session instance as returned by libssh2_session_init_ex(3)
20
21 path - Full path and filename of file to transfer to. That is the
22 remote file name.
23
24 mode - File access mode to create file with
25
26 size - Size of file being transmitted (Must be known ahead of time pre‐
27 cisely)
28
29 mtime - mtime to assign to file being created
30
31 atime - atime to assign to file being created (Set this and mtime to
32 zero to instruct remote host to use current time).
33
34 Send a file to the remote host via SCP.
35
37 Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on
38 errors.
39
40
42 LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
43
44 LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
45
46 LIBSSH2_ERROR_SCP_PROTOCOL -
47
48 LIBSSH2_ERROR_EAGAIN - Marked for non-blocking I/O but the call would
49 block.
50
52 This function was marked deprecated in libssh2 1.2.6 as
53 libssh2_scp_send64(3) has been introduced to replace this function.
54
56 libssh2_channel_open_ex(3)
57
58
59
60libssh2 0.15 1 Jun 2007 libssh2_scp_send_ex(3)