.TH ftp_unlink 3 "January 2004" "Feep Networks" "C Library Calls" .SH NAME ftp_unlink \- remove a file on an FTP server .SH SYNOPSIS .B #include .BI "int ftp_unlink(FTP *" ftp ", char *" file ");" .SH VERSION This man page documents version 1.3 of \fBlibfget\fP. .SH DESCRIPTION The \fBftp_unlink\fP() function will remove the file named \fIfile\fP on the FTP server associated with \fIftp\fP. .SH RETURN VALUE The \fBftp_unlink\fP() function returns 0 on success, or -1 on error (and sets \fIerrno\fP). .SH ERRORS The \fBftp_unlink\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. .TP .B ETXTBUSY The specified file is busy. .TP .B ENOENT The specified file does not exist. .TP .B EACCES The user does not have permission to unlink the specified file. .PP It may also fail for any of the errors specified for the underlying \fBpoll\fP(2), \fBread\fP(2) or \fBwrite\fP(2) system calls. .SH SEE ALSO .BR libfget (3), .BR unlink (2)