ftp_stat(3)

NAME
ftp_stat, ftp_lstat - get file status from an FTP server

SYNOPSIS
#include <libfget.h>

int ftp_stat(FTP *ftp, char *pathname, struct ftpstat *fsp);

int ftp_lstat(FTP *ftp, char *pathname, struct ftpstat *fsp);

VERSION
This man page documents version 1.2 of libfget.

DESCRIPTION
The ftp_stat() function writes a description of the file pathname on the FTP server associated with ftp to the memory pointed to by fsp.

The ftp_lstat() function is the same as the ftp_stat() function, except that it does not follow symbolic links.

RETURN VALUE
The ftp_stat() and ftp_lstat() functions return 0 on success, or -1 on error (and set errno).

If errno is set to ECONNRESET, it indicates that the server shut down the connection. The caller is then responsible for calling ftp_quit() with the FTP_FASTCLOSE flag set.

SEE ALSO
ftp_connect(3), stat(2), lstat(2)