libssh2_sftp_fsync.3 (1314B)
1.TH libssh2_sftp_fsync 3 "8 Apr 2013" "libssh2" "libssh2" 2.SH NAME 3libssh2_sftp_fsync - synchronize file to disk 4.SH SYNOPSIS 5.nf 6#include <libssh2.h> 7#include <libssh2_sftp.h> 8 9int 10libssh2_sftp_fsync(LIBSSH2_SFTP_HANDLE *handle) 11.fi 12.SH DESCRIPTION 13This function causes the remote server to synchronize the file 14data and metadata to disk (like fsync(2)). 15 16For this to work requires fsync@openssh.com support on the server. 17 18\fIhandle\fP - SFTP File Handle as returned by 19.BR libssh2_sftp_open_ex(3) 20.SH RETURN VALUE 21Returns 0 on success or negative on failure. If used in non-blocking mode, it 22returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 23LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 24.SH ERRORS 25\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. 26 27\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. 28 29\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response 30was received on the socket, or an SFTP operation caused an errorcode 31to be returned by the server. In particular, this can be returned if 32the SSH server does not support the fsync operation: the SFTP subcode 33\fILIBSSH2_FX_OP_UNSUPPORTED\fP will be returned in this case. 34.SH AVAILABILITY 35Added in libssh2 1.4.4 and OpenSSH 6.3. 36.SH SEE ALSO 37.BR fsync(2)