.TH ftp_mkdir 3 "January 2004" "Feep Networks" "C Library Calls" .SH NAME ftp_mkdir \- create a directory on an FTP server .SH SYNOPSIS .B #include .BI "int ftp_mkdir(FTP *" ftp ", char *" dir ");" .SH VERSION This man page documents version 1.3 of \fBlibfget\fP. .SH DESCRIPTION The \fBftp_mkdir\fP() function creates the directory \fIdir\fP on the FTP server associated with \fIftp\fP. .SH RETURN VALUE The \fBftp_mkdir\fP() function returns 0 on success, or -1 on error (and set \fIerrno\fP). .SH ERRORS The \fBftp_mkdir\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 EACCES The user does not have permission to perform the requested operation. .TP .B ENOENT A component of the path prefix does not exist. .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 mkdir (2)