Add libssh2_sftp_shutdown.3, libssh2_sftp_stat_ex.3,
libssh2_sftp_symlink_ex.3 and libssh2_sftp_tell.3
This commit is contained in:
parent
82d59f90e1
commit
fbf9d7cebd
@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile.am,v 1.20 2007/06/14 16:08:43 jehousley Exp $
|
# $Id: Makefile.am,v 1.21 2007/06/14 16:33:38 jehousley Exp $
|
||||||
|
|
||||||
EXTRA_DIST = template.3
|
EXTRA_DIST = template.3
|
||||||
|
|
||||||
@ -48,4 +48,8 @@ dist_man_MANS =
|
|||||||
libssh2_sftp_readdir.3 \
|
libssh2_sftp_readdir.3 \
|
||||||
libssh2_sftp_rename_ex.3 \
|
libssh2_sftp_rename_ex.3 \
|
||||||
libssh2_sftp_rmdir_ex.3 \
|
libssh2_sftp_rmdir_ex.3 \
|
||||||
libssh2_sftp_seek.3
|
libssh2_sftp_seek.3 \
|
||||||
|
libssh2_sftp_shutdown.3 \
|
||||||
|
libssh2_sftp_stat_ex.3 \
|
||||||
|
libssh2_sftp_symlink_ex.3 \
|
||||||
|
libssh2_sftp_tell.3
|
||||||
|
26
docs/libssh2_sftp_shutdown.3
Normal file
26
docs/libssh2_sftp_shutdown.3
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
.\" $Id: libssh2_sftp_shutdown.3,v 1.1 2007/06/14 16:33:38 jehousley Exp $
|
||||||
|
.\"
|
||||||
|
.TH libssh2_sftp_shutdown 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
|
||||||
|
.SH NAME
|
||||||
|
libssh2_sftp_shutdown - shut down an SFTP session
|
||||||
|
.SH SYNOPSIS
|
||||||
|
#include <libssh2.h>
|
||||||
|
#include <libssh2_sftp.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp);
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
\fIsftp\fP - SFTP instance as returned by
|
||||||
|
.BR libssh2_sftp_init(3)
|
||||||
|
|
||||||
|
Destroys a previously initialized SFTP session and frees all resources
|
||||||
|
associated with it.
|
||||||
|
|
||||||
|
.SH RETURN VALUE
|
||||||
|
Return 0 on success or negative on failure. It returns
|
||||||
|
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
|
||||||
|
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR libssh2_sftp_init(3)
|
62
docs/libssh2_sftp_stat_ex.3
Normal file
62
docs/libssh2_sftp_stat_ex.3
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
.\" $Id: libssh2_sftp_stat_ex.3,v 1.1 2007/06/14 16:33:38 jehousley Exp $
|
||||||
|
.\"
|
||||||
|
.TH libssh2_sftp_stat_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
|
||||||
|
.SH NAME
|
||||||
|
libssh2_sftp_stat_ex - rename a file
|
||||||
|
.SH SYNOPSIS
|
||||||
|
#include <libssh2.h>
|
||||||
|
#include <libssh2_sftp.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, int stat_type, LIBSSH2_SFTP_ATTRIBUTES *attrs);
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_stat(LIBSSH2_SFTP *sftp, const char *path, LIBSSH2_SFTP_ATTRIBUTES *attrs);
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_lstat(LIBSSH2_SFTP *sftp, const char *path, LIBSSH2_SFTP_ATTRIBUTES *attrs);
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_setstat(LIBSSH2_SFTP *sftp, const char *path, LIBSSH2_SFTP_ATTRIBUTES *attrs);
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
\fIsftp\fP - SFTP instance as returned by
|
||||||
|
.BR libssh2_sftp_init(3)
|
||||||
|
|
||||||
|
\fIpath\fP - Remote filesystem object to stat/lstat/setstat.
|
||||||
|
|
||||||
|
\fIpath_len\fP - Lenght of the name of the remote filesystem object
|
||||||
|
to stat/lstat/setstat.
|
||||||
|
|
||||||
|
\fIstat_type\fP - One of the three constants specifying the type of
|
||||||
|
stat operation to perform.
|
||||||
|
|
||||||
|
\fIattrs\fP - Pointer to attribute structure to set file metadata
|
||||||
|
from or into depending on the value of stat_type.
|
||||||
|
|
||||||
|
Get or Set statbuf type data on a remote filesystem object. When
|
||||||
|
getting statbuf data,
|
||||||
|
.BR libssh2_sftp_stat(3)
|
||||||
|
will follow all symlinks, while
|
||||||
|
.BR libssh2_sftp_lstat(3)
|
||||||
|
will return data about the object encountered, even if that object
|
||||||
|
happens to be a symlink.
|
||||||
|
|
||||||
|
.SH RETURN VALUE
|
||||||
|
Return 0 on success or negative on failure. It returns
|
||||||
|
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
|
||||||
|
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
|
||||||
|
|
||||||
|
.SH ERRORS
|
||||||
|
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
|
||||||
|
|
||||||
|
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
|
||||||
|
|
||||||
|
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
|
||||||
|
|
||||||
|
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
|
||||||
|
received on the socket, or an SFTP operation caused an errorcode to
|
||||||
|
be returned by the server.
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR libssh2_sftp_init(3)
|
70
docs/libssh2_sftp_symlink_ex.3
Normal file
70
docs/libssh2_sftp_symlink_ex.3
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
.\" $Id: libssh2_sftp_symlink_ex.3,v 1.1 2007/06/14 16:33:38 jehousley Exp $
|
||||||
|
.\"
|
||||||
|
.TH libssh2_sftp_symlink_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
|
||||||
|
.SH NAME
|
||||||
|
libssh2_sftp_symlink_ex - read or set a symbolic link
|
||||||
|
.SH SYNOPSIS
|
||||||
|
#include <libssh2.h>
|
||||||
|
#include <libssh2_sftp.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, char *target, unsigned int target_len, int link_type);
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_symlink(LIBSSH2_SFTP *sftp, const char *path, char *target);
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_readlink(LIBSSH2_SFTP *sftp, const char *path, char *target, unsigned int target_len);
|
||||||
|
|
||||||
|
int
|
||||||
|
libssh2_sftp_realpath(LIBSSH2_SFTP *sftp, const char *path, char *target, unsigned int target_len);
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
\fIsftp\fP - SFTP instance as returned by
|
||||||
|
.BR libssh2_sftp_init(3)
|
||||||
|
|
||||||
|
\fIpath\fP - Remote filesystem object to create a symlink from or resolve.
|
||||||
|
|
||||||
|
\fIpath_len\fP - Length of the name of the remote filesystem object to
|
||||||
|
create a symlink from or resolve.
|
||||||
|
|
||||||
|
\fItarget\fP -
|
||||||
|
.br
|
||||||
|
\fBLIBSSH2_SFTP_SYMLINK\fP: Remote filesystem object to link to.
|
||||||
|
.br
|
||||||
|
\fBLIBSSH2_SFTP_READLINK\fP: Pre-allocated buffer to resolve symlink target into.
|
||||||
|
.br
|
||||||
|
\fBLIBSSH2_SFTP_REALPATH\fP: Pre-allocated buffer to resolve realpath target into.
|
||||||
|
|
||||||
|
\fItarget_len\fP - Length of the name of the remote filesystem target object.
|
||||||
|
|
||||||
|
\fIlink_type\fP - One of the three previously mentioned constants which
|
||||||
|
determines the resulting behavior of this function.
|
||||||
|
|
||||||
|
.BR libssh2_sftp_symlink(3)
|
||||||
|
: Create a symbolic link between two filesystem objects.
|
||||||
|
.br
|
||||||
|
.BR libssh2_sftp_readlink(3)
|
||||||
|
: Resolve a symbolic link filesystem object to its next target.
|
||||||
|
.br
|
||||||
|
.BR libssh2_sftp_realpath(3)
|
||||||
|
: Resolve a complex, relative, or symlinked filepath to its effective target.
|
||||||
|
|
||||||
|
.SH RETURN VALUE
|
||||||
|
Return 0 on success or negative on failure. It returns
|
||||||
|
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
|
||||||
|
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
|
||||||
|
|
||||||
|
.SH ERRORS
|
||||||
|
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
|
||||||
|
|
||||||
|
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
|
||||||
|
|
||||||
|
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
|
||||||
|
|
||||||
|
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
|
||||||
|
received on the socket, or an SFTP operation caused an errorcode to
|
||||||
|
be returned by the server.
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR libssh2_sftp_init(3)
|
26
docs/libssh2_sftp_tell.3
Normal file
26
docs/libssh2_sftp_tell.3
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
.\" $Id: libssh2_sftp_tell.3,v 1.1 2007/06/14 16:33:38 jehousley Exp $
|
||||||
|
.\"
|
||||||
|
.TH libssh2_sftp_tell 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
|
||||||
|
.SH NAME
|
||||||
|
libssh2_sftp_tell - get the current read/write position indicator for a file
|
||||||
|
.SH SYNOPSIS
|
||||||
|
#include <libssh2.h>
|
||||||
|
#include <libssh2_sftp.h>
|
||||||
|
|
||||||
|
size_t
|
||||||
|
libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle);
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
\fIhandle\fP - SFTP File Handle as returned by
|
||||||
|
.BR libssh2_sftp_open(3)
|
||||||
|
|
||||||
|
Identify the current offset of the file handle's internal pointer. Note
|
||||||
|
that the SSH2 protocol does not have a notion of file pointers and that
|
||||||
|
libssh2 implements this using a localized file pointer which is updated
|
||||||
|
with each read/write call.
|
||||||
|
|
||||||
|
.SH RETURN VALUE
|
||||||
|
Current offset from beginning of file in bytes.
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR libssh2_sftp_open(3)
|
Loading…
x
Reference in New Issue
Block a user