1libssh2_sftp_close_handle(3) libssh2 manual libssh2_sftp_close_handle(3)
2
3
4
6 libssh2_sftp_close_handle - close filehandle
7
9 #include <libssh2.h> #include <libssh2_sftp.h>
10
11 int libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle);
12
13 int libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle);
14
15 int libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle);
16
17
19 handle - SFTP File Handle as returned by libssh2_sftp_open(3) or lib‐
20 ssh2_sftp_opendir(3)
21
22 Close an active LIBSSH2_SFTP_HANDLE. Because files and directories
23 share the same underlying storage mechanism these methods may be used
24 interchangably. It is recommended that libssh2_sftp_close() be used for
25 files and that libssh2_sftp_closedir() be used for directories so that
26 future changes in the library may cause minimal disruption.
27
28
30 Return 0 on success or negative on failure. It returns LIB‐
31 SSH2_ERROR_EAGAIN when it would otherwise block. While LIB‐
32 SSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per
33 se.
34
35
37 LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
38
39 LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
40
41 LIBSSH2_ERROR_SOCKET_TIMEOUT -
42
43 LIBSSH2_ERROR_SFTP_PROTOCOL - An invalid SFTP protocol response was
44 received on the socket, or an SFTP operation caused an errorcode to be
45 returned by the server.
46
47
49 libssh2_sftp_open(3) libssh2_sftp_opendir(3)
50
51
52
53libssh2 0.15 1 Jun 2007 libssh2_sftp_close_handle(3)