mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 21:00:33 +09:00
sftp: Add sftp_fsync() function
BUG: https://red.libssh.org/issues/141 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -788,6 +788,22 @@ LIBSSH_API sftp_statvfs_t sftp_fstatvfs(sftp_file file);
|
||||
*/
|
||||
LIBSSH_API void sftp_statvfs_free(sftp_statvfs_t statvfs_o);
|
||||
|
||||
/**
|
||||
* @brief Synchronize a file's in-core state with storage device
|
||||
*
|
||||
* This calls the "fsync@openssh.com" extention. You should check if the
|
||||
* extensions is supported using:
|
||||
*
|
||||
* @code
|
||||
* int supported = sftp_extension_supported(sftp, "fsync@openssh.com", "1");
|
||||
* @endcode
|
||||
*
|
||||
* @param file The opened sftp file handle to sync
|
||||
*
|
||||
* @return 0 on success, < 0 on error with ssh and sftp error set.
|
||||
*/
|
||||
LIBSSH_API int sftp_fsync(sftp_file file);
|
||||
|
||||
/**
|
||||
* @brief Canonicalize a sftp path.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user