libssh2

Форк
0
/
libssh2_sftp_open_ex_r.3 
77 строк · 2.7 Кб
1
.\" Copyright (C) The libssh2 project and its contributors.
2
.\" SPDX-License-Identifier: BSD-3-Clause
3
.TH libssh2_sftp_open_ex_r 3 "10 Apr 2023" "libssh2" "libssh2"
4
.SH NAME
5
libssh2_sftp_open_ex_r - 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_r(LIBSSH2_SFTP *sftp, const char *filename,
13
                       size_t filename_len,
14
                       unsigned long flags,
15
                       long mode,
16
                       int open_type,
17
                       LIBSSH2_SFTP_ATTRIBUTES *attrs);
18
.fi
19
.SH DESCRIPTION
20
\fIsftp\fP - SFTP instance as returned by \fIlibssh2_sftp_init(3)\fP
21

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

24
\fIfilename_len\fP - Length of filename
25

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

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

51
\fIopen_type\fP - Either of LIBSSH2_SFTP_OPENFILE (to open a file) or
52
LIBSSH2_SFTP_OPENDIR (to open a directory).
53

54
\fIattrs\fP - Pointer to LIBSSH2_SFTP_ATTRIBUTES struct. See
55
libssh2_sftp_fstat_ex for detailed usage.
56

57
.SH RETURN VALUE
58
A pointer to the newly created LIBSSH2_SFTP_HANDLE instance or NULL on
59
failure.
60
.SH ERRORS
61
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
62

63
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
64

65
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
66

67
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
68
received on the socket, or an SFTP operation caused an errorcode to be
69
returned by the server.
70

71
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
72
block.
73
.SH AVAILABILITY
74
Added in libssh2 1.11.0
75
.SH SEE ALSO
76
.BR libssh2_sftp_close_handle(3)
77
.BR libssh2_sftp_fstat_ex(3)
78

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

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

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

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