libssh2

Форк
0
/
libssh2_sftp_statvfs.3 
79 строк · 2.7 Кб
1
.\" Copyright (C) The libssh2 project and its contributors.
2
.\" SPDX-License-Identifier: BSD-3-Clause
3
.TH libssh2_sftp_statvfs 3 "22 May 2010" "libssh2" "libssh2"
4
.SH NAME
5
libssh2_sftp_statvfs, libssh2_sftp_fstatvfs - get file system statistics
6
.SH SYNOPSIS
7
.nf
8
#include <libssh2.h>
9
#include <libssh2_sftp.h>
10

11
int
12
libssh2_sftp_statvfs(LIBSSH2_SFTP *sftp, const char *path,
13
                     size_t path_len, LIBSSH2_SFTP_STATVFS *st);
14

15
int
16
libssh2_sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle,
17
                      LIBSSH2_SFTP_STATVFS *st)
18
.fi
19
.SH DESCRIPTION
20
These functions provide statvfs(2)-like operations and require
21
statvfs@openssh.com and fstatvfs@openssh.com extension support on the server.
22

23
\fIsftp\fP - SFTP instance as returned by
24
.BR libssh2_sftp_init(3)
25

26
\fIhandle\fP - SFTP File Handle as returned by
27
.BR libssh2_sftp_open_ex(3)
28

29
\fIpath\fP - full path of any file within the mounted file system.
30

31
\fIpath_len\fP - length of the full path.
32

33
\fIst\fP - Pointer to a LIBSSH2_SFTP_STATVFS structure to place file system
34
statistics into.
35
.SH DATA TYPES
36
LIBSSH2_SFTP_STATVFS is a typedefed struct that is defined as below
37

38
.nf
39
struct _LIBSSH2_SFTP_STATVFS {
40
    libssh2_uint64_t  f_bsize;    /* file system block size */
41
    libssh2_uint64_t  f_frsize;   /* fragment size */
42
    libssh2_uint64_t  f_blocks;   /* size of fs in f_frsize units */
43
    libssh2_uint64_t  f_bfree;    /* # free blocks */
44
    libssh2_uint64_t  f_bavail;   /* # free blocks for non-root */
45
    libssh2_uint64_t  f_files;    /* # inodes */
46
    libssh2_uint64_t  f_ffree;    /* # free inodes */
47
    libssh2_uint64_t  f_favail;   /* # free inodes for non-root */
48
    libssh2_uint64_t  f_fsid;     /* file system ID */
49
    libssh2_uint64_t  f_flag;     /* mount flags */
50
    libssh2_uint64_t  f_namemax;  /* maximum filename length */
51
};
52
.fi
53

54
It is unspecified whether all members of the returned struct have meaningful
55
values on all file systems.
56

57
The field \fIf_flag\fP is a bit mask. Bits are defined as follows:
58
.IP LIBSSH2_SFTP_ST_RDONLY
59
Read-only file system.
60
.IP LIBSSH2_SFTP_ST_NOSUID
61
Set-user-ID/set-group-ID bits are ignored by \fBexec\fP(3).
62
.SH RETURN VALUE
63
Returns 0 on success or negative on failure. If used in non-blocking mode, it
64
returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
65
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
66
.SH ERRORS
67
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
68

69
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
70

71
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
72

73
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
74
received on the socket, or an SFTP operation caused an errorcode to be returned
75
by the server.
76
.SH AVAILABILITY
77
Added in libssh2 1.2.6
78
.SH SEE ALSO
79
.BR libssh2_sftp_open_ex(3)
80

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

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

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

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