The ftppwd() call stores the string containing the FTP server description of the current working directory on the host to the buffer.
Syntax
#include <ftpapi.h> int ftppwd(host, userid, passwd, acct, buf, buflen) char *host; char *userid; char *passwd; char *acct, char *buf; crt *buflen;
Parameters
host
To specify the port number (other than the well-know port) used by the FTP server, code the host name, followed by a blank, then the port number. For example, specify ftppwd ("server1 1234",...)
Description
The ftppwd() call stores the string containing the FTP server description of the current working directory on the host to the buffer buf. The string describing the current working directory is truncated to fit buf if it is longer than buflen. The returned string is always null-terminated.
Return Values
The value 0 indicates success; the value -1 indicates an error. The value of ftperrno indicates the specific error. See Return Values for a description of the return codes.
Examples
int rc;rc=ftppwd("conypc","jason","ehgr1","dirbuf", sizeof dirbuf);
After the ftppwd() call, the buffer dirbuf contains the following:
"C:\" is current directory.
The server reply describing the current working directory on host conypc using user ID jason with password eghr1 is stored to dirbuf.