1 .\" $Id: libssh2_scp_send_ex.3,v 1.1 2007/06/14 14:56:32 jehousley Exp $
3 .TH libssh2_scp_send_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
5 libssh2_scp_send_ex - Send a file via SCP
10 libssh2_scp_send_ex(LIBSSH2_SESSION *session, const char *path, int mode, size_t size, long mtime, long atime);
13 libssh2_scp_send_ex(LIBSSH2_SESSION *session, const char *path, int mode, size_t size);
16 \fIsession\fP - Session instance as returned by
17 .BR libssh2_session_init(3)
19 \fIpath\fP - Full path and filename of file to transfer
21 \fImode\fP - File access mode to create file with
23 \fIsize\fP - Size of file being transmitted (Must be known
24 ahead of time precisely)
26 \fImtime\fP - mtime to assign to file being created
28 \fIatime\fP - atime to assign to file being created (Set this and
29 mtime to zero to instruct remote host to use current time).
31 Send a file to the remote host via SCP. This function
32 acts as a wrapper calling
33 .BR libssh2_channel_open_session(3)
35 .BR libssh2_channel_exec(3)
36 , and negotiating rcp protocol handshakes.
39 Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
42 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
44 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
46 \fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
48 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.
51 .BR libssh2_channel_open_session(3)
52 .BR libssh2_channel_exec(3)