libssh2

Форк
0
/
libssh2_sftp_open_ex.3 
69 строк · 2.4 Кб
1
.\" Copyright (C) The libssh2 project and its contributors.
2
.\" SPDX-License-Identifier: BSD-3-Clause
3
.TH libssh2_sftp_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
4
.SH NAME
5
libssh2_sftp_open_ex - open filehandle for file on SFTP.
6
.SH SYNOPSIS
7
.nf
8
#include <libssh2.h>
9
#include <libssh2_sftp.h>
10

11
LIBSSH2_SFTP_HANDLE *
12
libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp, const char *filename,
13
                     unsigned int filename_len,
14
                     unsigned long flags,
15
                     long mode,
16
                     int open_type);
17
.fi
18
.SH DESCRIPTION
19
\fIsftp\fP - SFTP instance as returned by \fIlibssh2_sftp_init(3)\fP
20

21
\fIfilename\fP - Remote file/directory resource to open
22

23
\fIfilename_len\fP - Length of filename
24

25
\fIflags\fP - Any reasonable combination of the LIBSSH2_FXF_* constants:
26
.RS
27
.IP LIBSSH2_FXF_READ
28
Open the file for reading.
29
.IP LIBSSH2_FXF_WRITE
30
Open the file for writing. If both this and LIBSSH2_FXF_READ are specified,
31
the file is opened for both reading and writing.
32
.IP LIBSSH2_FXF_APPEND
33
Force all writes to append data at the end of the file.
34
.IP LIBSSH2_FXF_CREAT,
35
If this flag is specified, then a new file will be created if one does not
36
already exist (if LIBSSH2_FXF_TRUNC is specified, the new file will be
37
truncated to zero length if it previously exists)
38
.IP LIBSSH2_FXF_TRUNC
39
Forces an existing file with the same name to be truncated to zero length when
40
creating a file by specifying LIBSSH2_FXF_CREAT. LIBSSH2_FXF_CREAT MUST also
41
be specified if this flag is used.
42
.IP LIBSSH2_FXF_EXCL
43
Causes the request to fail if the named file already exists.
44
LIBSSH2_FXF_CREAT MUST also be specified if this flag is used.
45

46
.RE
47
\fImode\fP - POSIX file permissions to assign if the file is being newly
48
created. See the LIBSSH2_SFTP_S_* convenience defines in <libssh2_sftp.h>
49

50
\fIopen_type\fP - Either of LIBSSH2_SFTP_OPENFILE (to open a file) or
51
LIBSSH2_SFTP_OPENDIR (to open a directory).
52
.SH RETURN VALUE
53
A pointer to the newly created LIBSSH2_SFTP_HANDLE instance or NULL on
54
failure.
55
.SH ERRORS
56
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
57

58
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
59

60
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
61

62
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
63
received on the socket, or an SFTP operation caused an errorcode to be
64
returned by the server.
65

66
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
67
block.
68
.SH SEE ALSO
69
.BR libssh2_sftp_close_handle(3)
70

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.