cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

libssh2_sftp_stat_ex.3 (2317B)


      1.TH libssh2_sftp_stat_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
      2.SH NAME
      3libssh2_sftp_stat_ex - get status about an SFTP file
      4.SH SYNOPSIS
      5.nf
      6#include <libssh2.h>
      7#include <libssh2_sftp.h>
      8
      9int
     10libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path,
     11                     unsigned int path_len, int stat_type,
     12                     LIBSSH2_SFTP_ATTRIBUTES *attrs);
     13.fi
     14.SH DESCRIPTION
     15\fIsftp\fP - SFTP instance as returned by
     16.BR libssh2_sftp_init(3)
     17
     18\fIpath\fP - Remote filesystem object to stat/lstat/setstat.
     19
     20\fIpath_len\fP - Length of the name of the remote filesystem object
     21to stat/lstat/setstat.
     22
     23\fIstat_type\fP - One of the three constants specifying the type of
     24stat operation to perform:
     25
     26.br
     27\fBLIBSSH2_SFTP_STAT\fP: performs stat(2) operation
     28.br
     29\fBLIBSSH2_SFTP_LSTAT\fP: performs lstat(2) operation
     30.br
     31\fBLIBSSH2_SFTP_SETSTAT\fP: performs operation to set stat info on file
     32
     33\fIattrs\fP - Pointer to a \fBLIBSSH2_SFTP_ATTRIBUTES\fP structure to set file
     34metadata from or into depending on the value of stat_type.
     35
     36Get or Set statbuf type data on a remote filesystem object. When getting
     37statbuf data,
     38.BR libssh2_sftp_stat(3)
     39will follow all symlinks, while
     40.BR libssh2_sftp_lstat(3)
     41will return data about the object encountered, even if that object
     42happens to be a symlink.
     43
     44The LIBSSH2_SFTP_ATTRIBUTES struct looks like this:
     45
     46.nf
     47struct LIBSSH2_SFTP_ATTRIBUTES {
     48    /* If flags & ATTR_* bit is set, then the value in this struct will be
     49     * meaningful Otherwise it should be ignored
     50     */
     51    unsigned long flags;
     52
     53    libssh2_uint64_t filesize;
     54    unsigned long uid;
     55    unsigned long gid;
     56    unsigned long permissions;
     57    unsigned long atime;
     58    unsigned long mtime;
     59};
     60.fi
     61.SH RETURN VALUE
     62Returns 0 on success or negative on failure.  It returns LIBSSH2_ERROR_EAGAIN
     63when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative
     64number, it is not really a failure per se.
     65.SH ERRORS
     66\fILIBSSH2_ERROR_ALLOC\fP -  An internal memory allocation call failed.
     67
     68\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
     69
     70\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
     71
     72\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
     73received on the socket, or an SFTP operation caused an errorcode to
     74be returned by the server.
     75.SH SEE ALSO
     76.BR libssh2_sftp_init(3)