DragonFly On-Line Manual Pages

Search: Section:  


ftp_readlink(3)                 C Library Calls                ftp_readlink(3)

NAME

ftp_readlink - read a symlink from an FTP server

SYNOPSIS

#include <libfget.h> int ftp_readlink(FTP *ftp, char *pathname, char *buf, size_t bufsize);

VERSION

This man page documents version 1.3 of libfget.

DESCRIPTION

The ftp_readlink() function reads the symlink specified by pathname from the FTP server associated with ftp and writes the path which the symlink points to into the buffer buf of size bufsize.

RETURN VALUE

The ftp_readlink() function returns 0 on success, or -1 on error (and sets errno).

ERRORS

The ftp_open() function fails if: ECONNRESET The server shut down the connection. The caller is then responsible for calling ftp_quit() with the FTP_QUIT_FAST flag set. ETIMEDOUT The operation timed out. (The timeout interval can be set via the FTP_OPT_IO_TIMEOUT option; see the ftp_set_options(3) man page for details.) EINVAL Unexpected response code received from server. EAGAIN An attempt was made to send a request to the server while the data connection is open. It may also fail for any of the errors specified for the underlying poll(2), read(2), write(2), socket(2), connect(2), fcntl(2) (using F_GETFL and F_SETFL), shutdown(2), close(2), or calloc(3) system and library calls.

NOTES

Because of the limitations of the FTP protocol, applications must not rely on being able to call ftp_readlink() while an FTPFILE handle is open. See libfget(3) for more information.

SEE ALSO

libfget(3), readlink(2) Feep Networks January 2004 ftp_readlink(3)

Search: Section: