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

NAME

6       libssh2_sftp_open - open filehandle for file on SFTP.
7

SYNOPSIS

9       #include <libssh2.h> #include <libssh2_sftp.h>
10
11       LIBSSH2_SFTP_HANDLE  *  libssh2_sftp_open_ex(LIBSSH2_SFTP  *sftp, const
12       char *filename, unsigned int filename_len, unsigned  long  flags,  long
13       mode, int open_type);
14
15       LIBSSH2_SFTP_HANDLE  * libssh2_sftp_open(LIBSSH2_SFTP *sftp, const char
16       *filename, unsigned long flags, long mode);
17
18       LIBSSH2_SFTP_HANDLE *  libssh2_sftp_opendir(LIBSSH2_SFTP  *sftp,  const
19       char *path);
20
21

DESCRIPTION

23       sftp - SFTP instance as returned by libssh2_sftp_init(3)
24
25       filename - Remote file/directory resource to open
26
27       filename_len - Length of filename
28
29       flags  -  Any  (reasonable)  combination of the LIBSSH2_FXF_* constants
30       corresponding fopen modes.
31
32       mode - POSIX file permissions to assign if the file is being newly cre‐
33       ated.
34
35       open_type  -  Either  of LIBSSH2_SFTP_OPENFILE (to open a file) or LIB‐
36       SSH2_SFTP_OPENDIR (to open a directory).
37

RETURN VALUE

39       A pointer to the newly created LIBSSH2_SFTP_HANDLE instance or NULL  on
40       failure.
41

ERRORS

43       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
44
45       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
46
47       LIBSSH2_ERROR_SOCKET_TIMEOUT -
48
49       LIBSSH2_ERROR_SFTP_PROTOCOL  -  An  invalid  SFTP protocol response was
50       received on the socket, or an SFTP operation caused an errorcode to  be
51       returned by the server.
52
53       LIBSSH2_ERROR_EAGAIN  -  Marked for non-blocking I/O but the call would
54       block.
55

SEE ALSO

57       libssh2_sftp_close_handle(3)
58
59
60
61
62libssh2 0.15                      1 Jun 2007           libssh2_sftp_open_ex(3)
Impressum