Buckets:
| /* Copyright (C) Sara Golemon <sarag@libssh2.org> | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, | |
| * with or without modification, are permitted provided | |
| * that the following conditions are met: | |
| * | |
| * Redistributions of source code must retain the above | |
| * copyright notice, this list of conditions and the | |
| * following disclaimer. | |
| * | |
| * Redistributions in binary form must reproduce the above | |
| * copyright notice, this list of conditions and the following | |
| * disclaimer in the documentation and/or other materials | |
| * provided with the distribution. | |
| * | |
| * Neither the name of the copyright holder nor the names | |
| * of any other contributors may be used to endorse or | |
| * promote products derived from this software without | |
| * specific prior written permission. | |
| * | |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND | |
| * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
| * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
| * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | |
| * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | |
| * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
| * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
| * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | |
| * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY | |
| * OF SUCH DAMAGE. | |
| * | |
| * SPDX-License-Identifier: BSD-3-Clause | |
| */ | |
| extern "C" { | |
| /* Note: Version 6 was documented at the time of writing | |
| * However it was marked as "DO NOT IMPLEMENT" due to pending changes | |
| * | |
| * Let's start with Version 3 (The version found in OpenSSH) and go from there | |
| */ | |
| typedef struct _LIBSSH2_SFTP LIBSSH2_SFTP; | |
| typedef struct _LIBSSH2_SFTP_HANDLE LIBSSH2_SFTP_HANDLE; | |
| typedef struct _LIBSSH2_SFTP_ATTRIBUTES LIBSSH2_SFTP_ATTRIBUTES; | |
| typedef struct _LIBSSH2_SFTP_STATVFS LIBSSH2_SFTP_STATVFS; | |
| /* Flags for open_ex() */ | |
| /* Flags for rename_ex() */ | |
| /* Flags for stat_ex() */ | |
| /* Flags for symlink_ex() */ | |
| /* Flags for sftp_mkdir() */ | |
| /* SFTP attribute flag bits */ | |
| /* SFTP statvfs flag bits */ | |
| struct _LIBSSH2_SFTP_ATTRIBUTES { | |
| /* If flags & ATTR_* bit is set, then the value in this struct will be | |
| * meaningful Otherwise it should be ignored | |
| */ | |
| unsigned long flags; | |
| libssh2_uint64_t filesize; | |
| unsigned long uid, gid; | |
| unsigned long permissions; | |
| unsigned long atime, mtime; | |
| }; | |
| struct _LIBSSH2_SFTP_STATVFS { | |
| libssh2_uint64_t f_bsize; /* file system block size */ | |
| libssh2_uint64_t f_frsize; /* fragment size */ | |
| libssh2_uint64_t f_blocks; /* size of fs in f_frsize units */ | |
| libssh2_uint64_t f_bfree; /* # free blocks */ | |
| libssh2_uint64_t f_bavail; /* # free blocks for non-root */ | |
| libssh2_uint64_t f_files; /* # inodes */ | |
| libssh2_uint64_t f_ffree; /* # free inodes */ | |
| libssh2_uint64_t f_favail; /* # free inodes for non-root */ | |
| libssh2_uint64_t f_fsid; /* file system ID */ | |
| libssh2_uint64_t f_flag; /* mount flags */ | |
| libssh2_uint64_t f_namemax; /* maximum filename length */ | |
| }; | |
| /* SFTP filetypes */ | |
| /* | |
| * Reproduce the POSIX file modes here for systems that are not POSIX | |
| * compliant. | |
| * | |
| * These is used in "permissions" of "struct _LIBSSH2_SFTP_ATTRIBUTES" | |
| */ | |
| /* File type */ | |
| /* File mode */ | |
| /* Read, write, execute/search by owner */ | |
| /* Read, write, execute/search by group */ | |
| /* Read, write, execute/search by others */ | |
| /* macros to check for specific file types, added in 1.2.5 */ | |
| /* SFTP File Transfer Flags -- (e.g. flags parameter to sftp_open()) | |
| * Danger will robinson... APPEND doesn't have any effect on OpenSSH servers */ | |
| /* SFTP Status Codes (returned by libssh2_sftp_last_error() ) */ | |
| /* Returned by any function that would block during a read/write operation */ | |
| /* SFTP API */ | |
| LIBSSH2_API LIBSSH2_SFTP *libssh2_sftp_init(LIBSSH2_SESSION *session); | |
| LIBSSH2_API int libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp); | |
| LIBSSH2_API unsigned long libssh2_sftp_last_error(LIBSSH2_SFTP *sftp); | |
| LIBSSH2_API LIBSSH2_CHANNEL *libssh2_sftp_get_channel(LIBSSH2_SFTP *sftp); | |
| /* File / Directory Ops */ | |
| LIBSSH2_API LIBSSH2_SFTP_HANDLE * | |
| libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp, | |
| const char *filename, | |
| unsigned int filename_len, | |
| unsigned long flags, | |
| long mode, int open_type); | |
| LIBSSH2_API LIBSSH2_SFTP_HANDLE * | |
| libssh2_sftp_open_ex_r(LIBSSH2_SFTP *sftp, | |
| const char *filename, | |
| size_t filename_len, | |
| unsigned long flags, | |
| long mode, int open_type, | |
| LIBSSH2_SFTP_ATTRIBUTES *attrs); | |
| LIBSSH2_API ssize_t libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, | |
| char *buffer, size_t buffer_maxlen); | |
| LIBSSH2_API int libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle, \ | |
| char *buffer, size_t buffer_maxlen, | |
| char *longentry, | |
| size_t longentry_maxlen, | |
| LIBSSH2_SFTP_ATTRIBUTES *attrs); | |
| LIBSSH2_API ssize_t libssh2_sftp_write(LIBSSH2_SFTP_HANDLE *handle, | |
| const char *buffer, size_t count); | |
| LIBSSH2_API int libssh2_sftp_fsync(LIBSSH2_SFTP_HANDLE *handle); | |
| LIBSSH2_API int libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle); | |
| LIBSSH2_API void libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, size_t offset); | |
| LIBSSH2_API void libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle, | |
| libssh2_uint64_t offset); | |
| LIBSSH2_API size_t libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle); | |
| LIBSSH2_API libssh2_uint64_t libssh2_sftp_tell64(LIBSSH2_SFTP_HANDLE *handle); | |
| LIBSSH2_API int libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle, | |
| LIBSSH2_SFTP_ATTRIBUTES *attrs, | |
| int setstat); | |
| /* Miscellaneous Ops */ | |
| LIBSSH2_API int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, | |
| const char *source_filename, | |
| unsigned int srouce_filename_len, | |
| const char *dest_filename, | |
| unsigned int dest_filename_len, | |
| long flags); | |
| LIBSSH2_API int libssh2_sftp_posix_rename_ex(LIBSSH2_SFTP *sftp, | |
| const char *source_filename, | |
| size_t srouce_filename_len, | |
| const char *dest_filename, | |
| size_t dest_filename_len); | |
| LIBSSH2_API int libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, | |
| const char *filename, | |
| unsigned int filename_len); | |
| LIBSSH2_API int libssh2_sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle, | |
| LIBSSH2_SFTP_STATVFS *st); | |
| LIBSSH2_API int libssh2_sftp_statvfs(LIBSSH2_SFTP *sftp, | |
| const char *path, | |
| size_t path_len, | |
| LIBSSH2_SFTP_STATVFS *st); | |
| LIBSSH2_API int libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp, | |
| const char *path, | |
| unsigned int path_len, long mode); | |
| LIBSSH2_API int libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, | |
| const char *path, | |
| unsigned int path_len); | |
| LIBSSH2_API int libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, | |
| const char *path, | |
| unsigned int path_len, | |
| int stat_type, | |
| LIBSSH2_SFTP_ATTRIBUTES *attrs); | |
| LIBSSH2_API int libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, | |
| const char *path, | |
| unsigned int path_len, | |
| char *target, | |
| unsigned int target_len, | |
| int link_type); | |
| } /* extern "C" */ | |
Xet Storage Details
- Size:
- 17.4 kB
- Xet hash:
- 6c056920ba2f04b7231420b43b0ce4c0094c57af30c849ae97f3eb48982b5e36
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.