ftp_rename(3)

NAME
ftp_rename, ftp_remove, ftp_chdir, ftp_mkdir, ftp_rmdir, ftp_getcwd - manipulate directory objects on an FTP server

SYNOPSIS
#include <libfget.h> int ftp_rename(FTP *ftp, char *oldname, char *newname); int ftp_remove(FTP *ftp, char *file); int ftp_chdir(FTP *ftp, char *dir); int ftp_mkdir(FTP *ftp, char *dir); int ftp_rmdir(FTP *ftp, char *dir); char *ftp_getcwd(FTP *ftp);

VERSION
This man page documents version 1.2 of libfget.

DESCRIPTION
The ftp_rename() function will rename a file on the FTP server associated with ftp named oldname to the name newname. The ftp_remove() function will remove the file named file on the FTP server associated with ftp. The ftp_chdir() function will change the current working directory on the FTP server associated with ftp to dir. The ftp_mkdir() and ftp_rmdir() functions will create or remove the directory dir on the FTP server associated with ftp, respectively. The ftp_getcwd() function returns the name of the current working directory on the FTP server associated with ftp.

RETURN VALUE
The ftp_rename(), ftp_remove(), ftp_chdir(), ftp_mkdir(), and ftp_rmdir() functions return 0 on success, or -1 on error (and set errno). The ftp_getcwd() function returns a pointer to a string representing the current working directory on success, or NULL on error (and sets 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), getcwd(2), chdir(2), mkdir(2), rmdir(2), remove(2), rename(2)