.TH ftp_readlink 3 "January 2004" "Feep Networks" "C Library Calls" .SH NAME ftp_readlink \- read a symlink from an FTP server .SH SYNOPSIS .B #include .BI "int ftp_readlink(FTP *" ftp ", char *" pathname "," .BI "char *" buf ", size_t " bufsize ");" .SH VERSION This man page documents version 1.3 of \fBlibfget\fP. .SH DESCRIPTION The \fBftp_readlink\fP() function reads the symlink specified by \fIpathname\fP from the FTP server associated with \fIftp\fP and writes the path which the symlink points to into the buffer \fIbuf\fP of size \fIbufsize\fP. .SH RETURN VALUE The \fBftp_readlink\fP() function returns 0 on success, or -1 on error (and sets \fIerrno\fP). .SH ERRORS The \fBftp_open\fP() function fails if: .TP .B ECONNRESET The server shut down the connection. The caller is then responsible for calling \fBftp_quit\fP() with the \fBFTP_QUIT_FAST\fP flag set. .TP .B ETIMEDOUT The operation timed out. (The timeout interval can be set via the \fBFTP_OPT_IO_TIMEOUT\fP option; see the \fBftp_set_options\fP(3) man page for details.) .TP .B EINVAL Unexpected response code received from server. .TP .B EAGAIN An attempt was made to send a request to the server while the data connection is open. .PP It may also fail for any of the errors specified for the underlying \fBpoll\fP(2), \fBread\fP(2), \fBwrite\fP(2), \fBsocket\fP(2), \fBconnect\fP(2), \fBfcntl\fP(2) (using \fBF_GETFL\fP and \fBF_SETFL\fP), \fBshutdown\fP(2), \fBclose\fP(2), or \fBcalloc\fP(3) system and library calls. .SH NOTES Because of the limitations of the FTP protocol, applications must not rely on being able to call \fBftp_readlink\fP() while an \fIFTPFILE\fP handle is open. See \fBlibfget\fP(3) for more information. .SH SEE ALSO .BR libfget (3), .BR readlink (2)