DragonFly On-Line Manual Pages

Search: Section:  


ftp_rename(3)                   C Library Calls                  ftp_rename(3)

NAME

ftp_rename - rename a file on an FTP server

SYNOPSIS

#include <libfget.h> int ftp_rename(FTP *ftp, char *oldname, char *newname);

VERSION

This man page documents version 1.3 of libfget.

DESCRIPTION

The ftp_rename() function will rename a file on the FTP server associated with ftp named oldname to the name newname.

RETURN VALUE

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

ERRORS

The ftp_rename() 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. ETXTBUSY The file specified by oldname is busy. ENOENT The file specified by oldname does not exist. EACCES The user does not have permission to rename the specified file. It may also fail for any of the errors specified for the underlying poll(2), read(2) or write(2) system calls.

SEE ALSO

libfget(3), rename(2) Feep Networks January 2004 ftp_rename(3)

Search: Section: